Skip to content

Commit

Permalink
Poetry + python 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
histrio committed Aug 15, 2019
1 parent a7bd4d0 commit 2b7778a
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.cache
output
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.cache
output
12 changes: 4 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
FROM python:3.6
FROM python:3.7

COPY requirements.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt && rm /tmp/requirements.txt

RUN apt-get install git && git clone https://github.com/kerrickstaley/genanki.git
RUN pip install genanki
COPY ./pyproject.toml .

RUN pip install poetry && poetry install

COPY main.py /app/main.py
VOLUME /tmp/.cache/
CMD ["python", "/app/main.py"]
CMD ["poetry", "run", "python", "/app/main.py"]
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@ build:
run:
docker run -it --rm histrio/czfrq:latest
run-dev:
docker run -it --rm -v ${PWD}/main.py:/app/main.py -v ${PWD}/output:/output -v ${PWD}/.cache:/tmp/.cache/ histrio/czfrq:latest
docker run -it --rm \
-v ${PWD}/main.py:/app/main.py \
-v ${PWD}/output:/output \
-v ${PWD}/.cache:/tmp/.cache/ \
histrio/czfrq:latest
19 changes: 19 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[tool.poetry]
name = "czfrq"
version = "0.1.0"
description = "Generate anki deck from Czech frequency word list"
authors = ["Rinat Sabitov <[email protected]>"]

[tool.poetry.dependencies]
python = "^3.7"
beautifulsoup4 = "4.8.0"
cachecontrol = "0.12.5"
lockfile = "0.12.2"
lxml = "4.4.1"
genanki = { git = "https://github.com/kerrickstaley/genanki.git", branch = "master" }

[tool.poetry.dev-dependencies]

[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"

0 comments on commit 2b7778a

Please sign in to comment.