-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile
75 lines (60 loc) · 1.69 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
VERSION=0.0.7
clean:
clear
@find . -type f -name "*.py[co]" -delete
@find . -type d -name "__pycache__" -delete
env/bin/python setup.py clean --all
rm -rf *.egg
rm -rf *.egg-info/
rm -rf *.log
prepare:
clear ; python3.5 -m venv env
# clear ; virtualenv env -p python2.7
deps:
clear ; env/bin/pip install -r requirements.txt
clear ; env/bin/pip install -r requirements-dev.txt
shell:
clear ; env/bin/python
test:
@printf "\033[34m====================== TESTING ======================\033[0m\n"
time env/bin/python -m unittest discover --failfast
test_all:
tox
coverage:
env/bin/coverage run -m unittest discover --failfast
env/bin/coverage report
env/bin/coverage html
open htmlcov/index.html
push: test
git push origin master
compile:
env/bin/python -OO -m compileall .
lib:
clear ; env/bin/python setup.py clean --all
clear ; env/bin/python setup.py test
clear ; env/bin/python setup.py build
register:
clear ; env/bin/python setup.py clean --all
clear ; env/bin/python setup.py sdist
clear ; env/bin/python setup.py register
publish:
# http://guide.python-distribute.org/quickstart.html
# python setup.py sdist
# python setup.py register
# Create a .pypirc file in ~ dir (cp .pypirc ~)
# python setup.py sdist upload
# Manual upload to PypI
# http://pypi.python.org/pypi/THE-PROJECT
# Go to 'edit' link
# Update version and save
# Go to 'files' link and upload the file
clear ; env/bin/python setup.py clean sdist upload
tag:
git tag ${VERSION}
git push origin ${VERSION}
reset_tag:
git tag -d ${VERSION}
git push origin :refs/tags/${VERSION}
run_file:
# make FILE=FILE_PATH run_file
clear ; env/bin/python -m epub_meta.runner $(FILE)