forked from bprinty/animation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
57 lines (44 loc) · 1.33 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
#
# animation Makefile
#
# @author <bprinty@gmail.com>
# ------------------------------------------------------
# config
# ------
VERSION = `python -c 'import animation; print(animation.__version__)'`
# targets
# -------
.PHONY: docs clean tag
help:
@echo "clean - remove all build, test, coverage and Python artifacts"
@echo "lint - check style with flake8"
@echo "test - run tests quickly with the default Python"
@echo "docs - generate Sphinx HTML documentation, including API docs"
@echo "release - package and upload a release"
@echo "build - package module"
@echo "install - install the package to the active Python's site-packages"
clean:
rm -fr build/
rm -fr dist/
rm -fr .eggs/
find . -name '*.egg-info' -exec rm -fr {} +
find . -name '*.egg' -exec rm -f {} +
lint:
flake8 animation tests
test:
nosetests -c setup.cfg tests
tag:
VER=$(VERSION) && if [ `git tag | grep "$$VER" | wc -l` -ne 0 ]; then git tag -d $$VER; fi
VER=$(VERSION) && git tag $$VER -m "animation, release $$VER"
docs:
cd docs && make html
build: clean
python setup.py sdist
python setup.py bdist_wheel
ls -l dist
release: build tag
VER=$(VERSION) && git push origin :$$VER || echo 'Remote tag available'
VER=$(VERSION) && git push origin $$VER
twine upload --skip-existing dist/*
install: clean
python setup.py install