# =====CONFIG===== # Devop environment runs in 3.8 # TODO switch this to python3.6 PYTHON=python3.6 # =====RECIPES===== .venv/bin/activate: setup.py '$(PYTHON)' -m venv .venv .venv/bin/pip install -e .[develop] venv: .venv/bin/activate .PHONY: venv format: venv @ .venv/bin/black setup.py app/*.py app/**/*.py .PHONY: format clean: rm -rf .venv rm backup_tool .PHONY: clean backup_tool: @ cd app && \ zip -r ../app.zip * \ -x "__pycache__/*" "**/__pycache__/*" ".vim/*" "**/.vim/*" @ echo "#!/usr/bin/env python3" | cat - app.zip > backup_tool @ chmod a+x backup_tool @ rm app.zip app: backup_tool .PHONY: app install: app cp backup_tool /usr/local/bin .PHONY: install # We can't force the develop to have all the versions locally, so # the local tests only include python3.6 test: venv tox.ini @ .venv/bin/tox -e py36 .PHONY: test lint: venv @ .venv/bin/tox -e lint .PHONY: lint