-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
79 lines (59 loc) · 1.98 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
.PHONY: setup virtualenv install test clean release graph clean_pyc clean_build
VIRTUALENV_DIR=${PWD}/env
APP_NAME=anchorman
setup: virtualenv install
help:
@echo ' setup ........ sets up project'
@echo ' test ......... runs unittest'
@echo ' clean ........ cleans project'
@echo ' release ...... releases project to pypi'
@echo ' graph ........ graph of project'
@echo ' metric ....... code metric at landscap.io'
@echo ' pypi ......... project on pypi'
virtualenv:
if [ ! -e ${VIRTUALENV_DIR}/bin/pip ]; then virtualenv ${VIRTUALENV_DIR} --no-site-packages; fi
install: virtualenv
${VIRTUALENV_DIR}/bin/pip install -r requirements.txt
${VIRTUALENV_DIR}/bin/python setup.py develop --always-unzip
test:
env/bin/py.test --cov-report term-missing --cov=${PWD}/${APP_NAME} tests -s -vv
testonly:
env/bin/py.test tests -s -vv
testprofile:
# env/bin/py.test --profile test/test_settings.py -s -vv
env/bin/py.test --profile tests/test_real_example.py -s -vv
# env/bin/py.test test/test_settings.py --profile-svg
testprofile2:
env/bin/py.test --profile tests/test_settings.py -s -vv
testapp:
env/bin/py.test tests/test_settings.py -s -vv
testcase:
env/bin/py.test tests/test_case.py -s -vv
clean_pyc:
find . -name '*.pyc' -exec rm -fv {} +
find . -name '*.pyo' -exec rm --force {} +
find . -name '*~' -exec rm --force {} +
clean_build:
rm -rfv build/
rm -rfv dist/
rm -rfv *.egg-info
clean: clean_build clean_pyc
rm -rfv .DS_Store .coverage .cache
rm -Rf **/__pycache__
rm -Rf env
rm -Rf .eggs
rm -Rf .tox
rm -Rf prof
release:
# check this out http://peterdowns.com/posts/first-time-with-pypi.html
python setup.py register -r pypitest
python setup.py sdist upload -r pypitest
python setup.py register -r pypi
python setup.py sdist upload -r pypi
graph:
pycallgraph --max-depth 5 graphviz -- ./anchorman/__init__.py
open pycallgraph.png
metric:
open https://landscape.io/github/rebeling/anchorman
pypi:
open https://pypi.python.org/pypi/anchorman