-
Notifications
You must be signed in to change notification settings - Fork 30
/
Makefile
62 lines (43 loc) · 1.47 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
.PHONY: build dist docs
VERSION=`python setup.py -V`
WHL_FILES := $(wildcard dist/*.whl)
WHL_ASC := $(WHL_FILES:=.asc)
DIST_FILE := $(wildcard dist/*.tar.gz)
DIST_ASC := $(DIST_FILE:=.asc)
build:
python setup.py build
dist:
python setup.py sdist
install: dist
pip -V
pip install --no-cache-dir --no-deps --upgrade --force-reinstall --find-links ./dist/btdht-${VERSION}.tar.gz btdht
uninstall:
pip uninstall btdht || true
dist/%.asc:
gpg --detach-sign -a $(@:.asc=)
publish_pypi_release: test_venv test_venv/bin/twine dist sign_release
test_venv/bin/twine upload --sign dist/*
sign_release: $(WHL_ASC) $(DIST_ASC)
test_venv/bin/twine:
test_venv/bin/pip install twine
test_venv: test_venv/bin/python
test_venv/bin/python:
virtualenv test_venv
test_venv/bin/pip install -U --requirement requirements-dev.txt
test_venv/lib/python2.7/site-packages/btdht:
python setup.py sdist
test_venv/bin/pip install --no-cache-dir --no-deps --upgrade --force-reinstall --find-links ./dist/btdht-${VERSION}.tar.gz btdht
test_venv/bin/sphinx-build: test_venv
test_venv/bin/pip install Sphinx sphinx_rtd_theme
docs: test_venv/bin/sphinx-build test_venv/lib/python2.7/site-packages/btdht
bash -c "source test_venv/bin/activate; cd docs; make html"
clean:
rm -rf build dist btdht.egg-info
find ./btdht/ -name '*.c' -delete
find ./ -name '*.pyc' -delete
find ./ -name '*~' -delete
clean_docs:
cd docs; make clean
clean_test_venv:
rm -rf test_venv
clean_all: clean clean_test_venv clean_docs