-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
59 lines (44 loc) · 1.4 KB
/
Copy pathMakefile
File metadata and controls
59 lines (44 loc) · 1.4 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
59
MAKEFLAGS += --always-make
VERSION ?= $(shell python3 -c "from xkits_command.attribute import __version__; print(__version__)")
all: build test
release: all
if [ -n "${VERSION}" ]; then \
git tag -a v${VERSION} -m "release v${VERSION}"; \
git push origin --tags; \
fi
version:
@echo ${VERSION}
upload:
python3 -m pip install --upgrade xpip-upload
xpip-upload --config-file .pypirc dist/*
build-prepare:
python3 -m pip install --upgrade xpip-build
build-clean:
find . -type d -name "__pycache__" -exec rm -rf {} +
rm -rf build dist *.egg-info
build: build-prepare build-clean
python3 -m build --sdist --wheel
install-requirements:
python3 -m pip install --upgrade -r requirements.txt
install: install-requirements
python3 -m pip install --force-reinstall --no-deps dist/*.whl
uninstall:
python3 -m pip uninstall -y xkits-command
reinstall: uninstall install
test-prepare: install-requirements
python3 -m pip install --upgrade mock flake8 pylint pytest pytest-cov
flake8:
flake8 xkits_command
pylint:
pylint $(shell git ls-files xkits_command/*.py)
pytest:
pytest --cov --cov-config=.coveragerc --cov-report=term-missing --cov-report=xml --cov-report=html
pytest-clean:
rm -rf .pytest_cache
test: test-prepare flake8 pylint pytest
test-clean: pytest-clean
clean-cover:
rm -rf cover .coverage coverage.xml htmlcov
clean-tox:
rm -rf .stestr .tox
clean: build-clean test-clean clean-cover clean-tox