-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (41 loc) · 1.42 KB
/
Makefile
File metadata and controls
43 lines (41 loc) · 1.42 KB
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
PYTHON_MODULES = wells
PYTHONPATH = .
VENV = .venv
PYTHON = env PYTHONPATH=$(PYTHONPATH) $(VENV)/bin/python
PIP = env PYTHONPATH=$(PYTHONPATH) $(VENV)/bin/pip
PYTEST = env PYTHONPATH=$(PYTHONPATH) PYTEST=1 $(VENV)/bin/py.test
PYLINT = env PYTHONPATH=$(PYTHONPATH) $(VENV)/bin/pylint --disable=missing-docstring,invalid-name,global-statement --msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}"
PEP8 = env PYTHONPATH=$(PYTHONPATH) $(VENV)/bin/pycodestyle --repeat --ignore=E202,E501,W504
default: test
bootstrap:
test -d $(VENV) || python3 -m venv $(VENV) || python2 -m virtualenv -q $(VENV)
$(PIP) install -q -r requirements-dev.txt
dist: bootstrap
rm -rf dist/*
$(PYTHON) setup.py -q sdist
$(PYTHON) setup.py -q bdist_wheel --universal
upload: dist
docker run --rm -v "$(CURDIR)/dist":/dist -e TWINE_USERNAME -e TWINE_PASSWORD sylecn/twine:buster twine upload /dist/*
build:
deb:
./utils/build-deb
check: test
pylint: bootstrap
$(PEP8) $(PYTHON_MODULES)
$(PYLINT) -E $(PYTHON_MODULES)
pylint-full: pylint
$(PYLINT) $(PYTHON_MODULES)
test: pylint
$(PYTEST) $(PYTHON_MODULES)
tox:
$(VENV)/bin/tox
install-git-hooks:
utils/install-git-hooks
clean:
find . -name "__pycache__" -type d -exec rm -rf {} \;
find . -name "*.pyc" -type f -exec rm -rf {} \;
TAGS:
etags -R --exclude=static $(PYTHON_MODULES)
loc:
cloc wells
.PHONY: default dist upload build bootstrap check pylint pylint-full test tox install-git-hooks clean TAGS loc