-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
66 lines (56 loc) · 1.35 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
module = xphyle
#pytestops = "--full-trace"
#pytestops = "-v -s"
repo = jdidion/$(module)
desc = Release $(version)
tests = tests
desc = ''
# Use this option to show full stack trace for errors
#pytestopts = "--full-trace"
all: install test
install:
python setup.py install
test:
pytest -m "not perf" -vv --cov --cov-report term-missing $(pytestopts) $(tests)
perftest:
pytest -m "perf" $(tests)
clean:
rm -Rf __pycache__
rm -Rf **/__pycache__/*
rm -Rf dist
rm -Rf build
rm -Rf *.egg-info
rm -Rf .pytest_cache
rm -Rf .coverage
tag:
git tag $(version)
release: clean tag install test
echo "Releasing version $(version)"
python setup.py sdist bdist_wheel
# pypi doesn't accept eggs
rm dist/*.egg
# release
#python setup.py upload -r pypi
twine upload -u "__token__" -p "$(pypi_token)" dist/*
# push new tag after successful build
git push origin --tags
# create release in GitHub
curl -v -i -X POST \
-H "Content-Type:application/json" \
-H "Authorization: token $(token)" \
https://api.github.com/repos/$(repo)/releases \
-d '{ \
"tag_name":"$(version)", \
"target_commitish": "master", \
"name": "$(version)", \
"body": "$(desc)", \
"draft": false, \
"prerelease": false \
}'
docs:
make -C docs api
make -C docs html
readme:
pandoc --from=markdown --to=rst --output=README.rst README.md
lint:
pylint $(module)