forked from larrycameron80/bridgedb-2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
91 lines (67 loc) · 1.95 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
.PHONY: install test
.DEFAULT: install test
TRIAL:=$(shell which trial)
VERSION:=$(shell git describe)
define PYTHON_WHICH
import platform
import sys
sys.stdout.write(platform.python_implementation())
endef
PYTHON_IMPLEMENTATION:=$(shell python -c '$(PYTHON_WHICH)')
PYTHON_PYTHON=CPython
PYTHON_PYPY=PyPy
all: uninstall clean install coverage-test
test:
python setup.py test
pep8:
find bridgedb/*.py | xargs pep8
pylint:
pylint --rcfile=./.pylintrc ./bridgedb/
pyflakes:
pyflakes ./bridgedb/
install:
-python setup.py compile_catalog
BRIDGEDB_INSTALL_DEPENDENCIES=0 python setup.py install --record installed-files.txt
force-install:
-python setup.py compile_catalog
BRIDGEDB_INSTALL_DEPENDENCIES=0 python setup.py install --force --record installed-files.txt
uninstall:
touch installed-files.txt
cat installed-files.txt | xargs rm -rf
rm installed-files.txt
reinstall: uninstall force-install
translations:
./maint/get-completed-translations
translations-template:
python setup.py extract_messages
docs:
python setup.py build_sphinx --version "$(VERSION)"
cd build/sphinx/html && \
zip -r ../"$(VERSION)"-docs.zip ./ && \
echo "Your package documents are in build/sphinx/$(VERSION)-docs.zip"
clean-docs:
-rm -rf build/sphinx
clean-coverage-html:
-rm -rf doc/coverage-html
clean: clean-docs clean-coverage-html
-rm -rf build
-rm -rf dist
-rm -rf bridgedb.egg-info
-rm -rf _trial_temp
coverage-test:
ifeq ($(PYTHON_IMPLEMENTATION),PyPy)
@echo "Detected PyPy... not running coverage."
python setup.py test
else
coverage run --rcfile=".coveragerc" -m twisted.trial ./bridgedb/test/test_*.py
coverage report --rcfile=".coveragerc"
endif
coverage-html:
coverage html --rcfile=".coveragerc"
coverage: coverage-test coverage-html
upload: clean
python setup.py bdist_egg upload --sign
#python setup.py bdist_wheel upload --sign
python setup.py sdist --formats=gztar,zip upload --sign
tags:
find ./bridgedb -type f -name "*.py" -print | xargs etags