| 1 |
|
| 2 |
PYTHON=python |
| 3 |
TRIAL=trial |
| 4 |
TEST=foolscap |
| 5 |
|
| 6 |
.PHONY: build test |
| 7 |
|
| 8 |
build: |
| 9 |
$(PYTHON) setup.py build |
| 10 |
|
| 11 |
test: |
| 12 |
$(TRIAL) $(TEST) |
| 13 |
|
| 14 |
test-poll: |
| 15 |
$(MAKE) test TRIAL="trial -r poll" |
| 16 |
|
| 17 |
api-docs: |
| 18 |
rm -rf doc/api |
| 19 |
PYTHONPATH=. epydoc -v -o doc/api --html -n Foolscap -u http://foolscap.lothar.com --exclude foolscap.test foolscap |
| 20 |
|
| 21 |
pyflakes: |
| 22 |
pyflakes setup.py src |sort |uniq |
| 23 |
|
| 24 |
find-trailing-spaces: |
| 25 |
find-trailing-spaces -r src |
| 26 |
|
| 27 |
setup-test-from-tarball: |
| 28 |
rm -rf sdist-test |
| 29 |
$(PYTHON) setup.py sdist -d sdist-test |
| 30 |
cd sdist-test && tar xf *.tar.gz |
| 31 |
rm sdist-test/*.tar.gz |
| 32 |
cd sdist-test && ln -s * srcdir |
| 33 |
|
| 34 |
test-from-tarball: |
| 35 |
cd sdist-test/srcdir && trial foolscap |
| 36 |
|
| 37 |
.PHONY: release _release |
| 38 |
release: |
| 39 |
@if [ "X${VERSION}" = "X" ]; then echo "must pass VERSION="; else $(MAKE) _release; fi |
| 40 |
|
| 41 |
_release: |
| 42 |
git tag -s -u AF1B4A2A -m "release foolscap-${VERSION}" foolscap-${VERSION} |
| 43 |
python setup.py sdist bdist_wheel |
| 44 |
cd dist && gpg -u AF1B4A2A -ba foolscap-${VERSION}.tar.gz |
| 45 |
cd dist && gpg -u AF1B4A2A -ba foolscap-${VERSION}-py2-none-any.whl |
| 46 |
echo "manual steps:" |
| 47 |
@echo "git push warner master foolscap-${VERSION}" |
| 48 |
@echo "update 'latest-release' tag, push -f" |
| 49 |
@echo "twine register dist/foolscap-${VERSION}-py2-none-any.whl" |
| 50 |
@echo "twine upload dist/foolscap-${VERSION}*" |