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.

18 lines
510B

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