-
Notifications
You must be signed in to change notification settings - Fork 53
/
Copy pathMakefile
50 lines (38 loc) · 1.18 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
.PHONY: clean install dev flake8 pylint lint dist upload uploadtest test docs
PKG := $(shell basename $(CURDIR) | cut -d- -f1)
PIPRUN := $(shell command -v pipenv > /dev/null && echo pipenv run)
clean:
find . -name '*.pyc' -print0 | xargs -0 rm -f
find . -name '*.swp' -print0 | xargs -0 rm -f
find . -name '.DS_Store' -print0 | xargs -0 rm -rf
find . -name '__pycache__' -print0 | xargs -0 rm -rf
rm -rf build dist *.egg-info .eggs || true
rm -rf .tox .coverage cover || true
rm -rf docs/_build || true
rm -rf Pipfile.lock || true
rm -rf .vscode || true
command -v pipenv > /dev/null && \
pipenv --venv > /dev/null 2>&1 && \
pipenv --rm || true
install:
command -v pipenv > /dev/null && \
pipenv install --skip-lock -e . || \
pip install -e .
dev:
command -v pipenv > /dev/null && \
pipenv install --skip-lock --dev || true
flake8:
${PIPRUN} flake8
pylint:
${PIPRUN} pylint setup.py tests ${PKG}
lint: flake8 pylint
dist: clean install
${PIPRUN} python setup.py sdist bdist_wheel
upload:
${PIPRUN} twine upload dist/*
uploadtest:
${PIPRUN} twine upload --repository-url https://test.pypi.org/legacy/ dist/*
docs: install
cd docs && ${PIPRUN} make html
test: clean
tox