-all: build
- @sed \
+all: check test build/crypto-install.py
+
+run: build/crypto-install.py
+ build/crypto-install.py
+
+check:
+ pep8 .
+
+test:
+ ./setup.py test
+
+build:
+ mkdir build
+
+build/crypto-install.py: crypto-install.py build
+ sed \
-e "s/GIT-TAG/`git describe --abbrev=0 --tags`/g" \
-e "s/GIT-COMMIT/`git rev-parse --short=7 HEAD`/g" \
-e "s/GIT-BRANCH/`git rev-parse --abbrev-ref HEAD`/g" \
- crypto-install.py > build/crypto_install.py
+ crypto-install.py > build/crypto-install.py
+ chmod a+rx build/crypto-install.py
-build:
- mkdir build
+clean:
+ rm -rf build
Simply copy the built file into your path and possibly ensure execution
permissions.
+
+# DEVELOPMENT
+
+There is a `Makefile` available to run common commands, e.g.:
+
+ make # checks PEP8, runs tests, builds final file
+ make run # run the built program
+ make clean # remove build folder
+
+If you have [`git-hooks`](https://github.com/icefox/git-hooks)
+installed, then the two hooks in `git_hooks` will run the tests and
+check for PEP8 compatibility before committing as well. Run
+`git hooks --install` in the checked out folder to register the hooks
+initially.