Add CHANGELOG entry for #33299.
[tor-bridgedb.git] / Makefile
blob08c2fbdde0025d1b0b1afabc076925ec60bc2425
2 .PHONY: install test
3 .DEFAULT: install test
5 TRIAL:=$(shell which trial)
6 VERSION:=$(shell git describe)
8 define PYTHON_WHICH
9 import platform
10 import sys
11 sys.stdout.write(platform.python_implementation())
12 endef
14 PYTHON_IMPLEMENTATION:=$(shell python -c '$(PYTHON_WHICH)')
15 PYTHON_PYTHON=CPython
16 PYTHON_PYPY=PyPy
18 all: uninstall clean install coverage-test
20 test:
21 python setup.py test
23 pep8:
24 find bridgedb/*.py | xargs pep8
26 pylint:
27 pylint --rcfile=./.pylintrc ./bridgedb/
29 pyflakes:
30 pyflakes ./bridgedb/
32 install:
33 -python setup.py compile_catalog
34 BRIDGEDB_INSTALL_DEPENDENCIES=0 python setup.py install --record installed-files.txt
36 force-install:
37 -python setup.py compile_catalog
38 BRIDGEDB_INSTALL_DEPENDENCIES=0 python setup.py install --force --record installed-files.txt
40 uninstall:
41 touch installed-files.txt
42 cat installed-files.txt | xargs rm -rf
43 rm installed-files.txt
45 reinstall: uninstall force-install
47 translations:
48 ./maint/get-completed-translations
50 translations-template:
51 python setup.py extract_messages
53 docs:
54 python setup.py build_sphinx --version "$(VERSION)"
55 cd build/sphinx/html && \
56 zip -r ../"$(VERSION)"-docs.zip ./ && \
57 echo "Your package documents are in build/sphinx/$(VERSION)-docs.zip"
59 clean-docs:
60 -rm -rf build/sphinx
62 clean-coverage-html:
63 -rm -rf doc/coverage-html
65 clean: clean-docs clean-coverage-html
66 -rm -rf build
67 -rm -rf dist
68 -rm -rf bridgedb.egg-info
69 -rm -rf _trial_temp
71 coverage-test:
72 ifeq ($(PYTHON_IMPLEMENTATION),PyPy)
73 @echo "Detected PyPy... not running coverage."
74 python setup.py test
75 else
76 coverage run --rcfile=".coveragerc" -m twisted.trial ./bridgedb/test/test_*.py
77 coverage report --rcfile=".coveragerc"
78 endif
80 coverage-html:
81 coverage html --rcfile=".coveragerc"
83 coverage: coverage-test coverage-html
85 upload: clean
86 python setup.py bdist_egg upload --sign
87 #python setup.py bdist_wheel upload --sign
88 python setup.py sdist --formats=gztar,zip upload --sign
90 tags:
91 find ./bridgedb -type f -name "*.py" -print | xargs etags