diff --git a/.gitignore b/.gitignore index f3709c0..d43ea55 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ src/__pycache__/ _build/ -NewLang diff --git a/Makefile b/Makefile index c07c906..3671772 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,20 @@ SHELL=/bin/bash -build: clean_pycache - python3 -m zipapp src -p "/usr/bin/env python3" -c -m "main:main" -o NewLang +build: _build + test ! -d _build/zip || rm -r _build/zip + mkdir -p _build/zip + cp -r src _build/zip + test ! -d _build/zip/src/__pycache__ || rm -r _build/zip/src/__pycache__ + python3 -m zipapp _build/zip/src -p "/usr/bin/env python3" -c -m "main:main" -o _build/NewLang -clean_pycache: - test ! -d src/__pycache__ || rm -r src/__pycache__ +clean: + test ! -d _build || rm -r _build -clean: clean_pycache clean_build - test ! -e NewLang || rm NewLang +tidy: _build/.stamp_venv + source _build/venv/bin/activate && black src +venv_bash: _build/.stamp_venv + source _build/venv/bin/activate && bash _build: mkdir -p _build @@ -16,12 +22,3 @@ python3 -m venv _build/venv source _build/venv/bin/activate && pip install -r requirements.txt touch _build/.stamp_venv - -tidy: _build/.stamp_venv - source _build/venv/bin/activate && black src - -clean_build: - rm -rf _build/ - -venv_bash: _build/.stamp_venv - source _build/venv/bin/activate && bash