| 1 |
VERSION=`cat VERSION` |
| 2 |
|
| 3 |
.PHONY: all |
| 4 |
all: |
| 5 |
|
| 6 |
.PHONY: dist |
| 7 |
dist: |
| 8 |
rm -rf build/*.tar.gz |
| 9 |
python3 setup.py sdist -d build |
| 10 |
@printf "Package: "; echo build/*.tar.gz |
| 11 |
|
| 12 |
.PHONY: upload |
| 13 |
upload: twine-check dist |
| 14 |
twine upload -u zeek build/btest-$(VERSION).tar.gz |
| 15 |
|
| 16 |
.PHONY: test |
| 17 |
test: |
| 18 |
@(cd testing && make) |
| 19 |
|
| 20 |
.PHONY: twine-check |
| 21 |
twine-check: |
| 22 |
@type twine > /dev/null 2>&1 || \ |
| 23 |
{ \ |
| 24 |
echo "Uploading to PyPi requires 'twine' and it's not found in PATH."; \ |
| 25 |
echo "Install it and/or make sure it is in PATH."; \ |
| 26 |
echo "E.g. you could use the following command to install it:"; \ |
| 27 |
echo "\tpip3 install twine"; \ |
| 28 |
echo ; \ |
| 29 |
exit 1; \ |
| 30 |
} |