| 1 |
venv = venv |
| 2 |
bin = ${venv}/bin/ |
| 3 |
pysources = src/ tests/ |
| 4 |
|
| 5 |
build: |
| 6 |
${bin}python -m build |
| 7 |
|
| 8 |
check: |
| 9 |
${bin}black --check --diff ${pysources} |
| 10 |
${bin}flake8 ${pysources} |
| 11 |
${bin}mypy ${pysources} |
| 12 |
${bin}isort --check --diff ${pysources} |
| 13 |
|
| 14 |
install: install-python |
| 15 |
|
| 16 |
venv: |
| 17 |
python3 -m venv ${venv} |
| 18 |
|
| 19 |
install-python: venv |
| 20 |
${bin}pip install -U pip wheel |
| 21 |
${bin}pip install -U build |
| 22 |
${bin}pip install -r requirements.txt |
| 23 |
|
| 24 |
format: |
| 25 |
${bin}autoflake --in-place --recursive ${pysources} |
| 26 |
${bin}isort ${pysources} |
| 27 |
${bin}black ${pysources} |
| 28 |
|
| 29 |
publish: |
| 30 |
${bin}twine upload dist/* |
| 31 |
|
| 32 |
test: |
| 33 |
${bin}pytest |