-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
58 lines (43 loc) · 1.39 KB
/
Makefile
File metadata and controls
58 lines (43 loc) · 1.39 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
MAKEFLAGS += --always-make
VERSION := $(shell python3 setup.py --version)
all: build reinstall test
release: all
if [ -n "${VERSION}" ]; then \
git tag -a v${VERSION} -m "release v${VERSION}"; \
git push origin --tags; \
fi
version:
@echo ${VERSION}
clean-cover:
rm -rf cover .coverage coverage.xml htmlcov
clean-tox:
rm -rf .stestr .tox
clean: build-clean test-clean clean-cover clean-tox
upload:
python3 -m pip install --upgrade xpip-upload
xpip-upload --config-file .pypirc dist/*
build-prepare:
python3 -m pip install --upgrade -r requirements.txt
python3 -m pip install --upgrade xpip-build
build-clean:
xpip-build --debug setup --clean
build: build-prepare build-clean
xpip-build --debug setup --all
install:
python3 -m pip install --force-reinstall --no-deps dist/*.whl
uninstall:
python3 -m pip uninstall -y xhtm
reinstall: uninstall install
test-prepare:
python3 -m pip install --upgrade mock pylint flake8 pytest pytest-cov
pylint:
pylint $(shell git ls-files xhtml/*.py)
flake8:
flake8 xhtml --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 xhtml --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
pytest:
pytest --cov=xhtml --cov-report=term-missing --cov-report=xml --cov-report=html --cov-config=.coveragerc --cov-fail-under=100
pytest-clean:
rm -rf .pytest_cache
test: test-prepare pylint flake8 pytest
test-clean: pytest-clean