You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 line
601B

  1. include .env
  2. FILE = $(shell find . -path "./y????/p??.py" -type f | xargs ls -rt | tail -n 1)
  3. DATA = $(shell echo $(FILE) | sed s/.py/.dat/)
  4. PYTHONPATH = .
  5. export
  6. main: venv/ $(DATA)
  7. @venv/bin/python -u toolkit.py $(FILE)
  8. @cat $(DATA) | venv/bin/python -u $(FILE)
  9. flake: venv/
  10. venv/bin/flake8 --exclude=venv/
  11. venv/: requirements.txt
  12. rm -rf venv/
  13. ~/.pyenv/versions/3.8.0/bin/python -m venv venv
  14. venv/bin/pip install -r requirements.txt
  15. touch requirements.txt venv/
  16. # install flake8 git hook
  17. # echo 'venv/bin/flake8 --exclude=venv/' > .git/hooks/pre-commit
  18. # chmod +x .git/hooks/pre-commit