-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·73 lines (58 loc) · 1.32 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
version := $(shell python3 -c 'from jgtpy import __version__; print(__version__)')
.PHONY: venv
venv:
[ -d .venv ] || virtualenv .venv --python=jgtpy
conda activate jgtpy
.PHONY: piplocal
piplocal:
pip install -e '.[dev]'
.PHONY: develop
develop: venv piplocal
.PHONY: lint lint-flake8 lint-isort
lint-flake8:
flake8 test jgtpy
lint-isort:
isort --check-only -rc jgtpy test *.py
lint: lint-flake8 lint-isort
.PHONY: format
format:
isort -rc jgtpy test *.py
.PHONY: test
test:
coverage run -m py.test
coverage report
.PHONY: readme_check
readme_check:
./setup.py check --restructuredtext --strict
.PHONY: rst_check
rst_check:
make readme_check
# Doesn't generate any output but prints out errors and warnings.
make -C docs dummy
.PHONY: clean
clean:
find . -name "*.pyc" -print0 | xargs -0 rm -f
rm -Rf dist
rm -Rf *.egg-info
.PHONY: docs
docs:
cd docs && make html
.PHONY: authors
authors:
git log --format='%aN <%aE>' `git describe --abbrev=0 --tags`..@ | sort | uniq >> AUTHORS
cat AUTHORS | sort --ignore-case | uniq >> AUTHORS_
mv AUTHORS_ AUTHORS
.PHONY: dist
dist:
make clean
python setup.py sdist --format=gztar bdist_wheel
.PHONY: pypi-release
pypi-release:
twine --version
twine upload -s dist/*
.PHONY: release
release:
make dist
git tag -s $(version)
git push origin $(version)
make pypi-release