-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
70 lines (51 loc) · 1.87 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
SHELL := /bin/bash
MAX_LINE_LENGTH := 119
POETRY_VERSION := $(shell poetry --version 2>/dev/null)
help: ## List all commands
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z0-9 -]+:.*?## / {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
check-poetry:
@if [[ "${POETRY_VERSION}" == *"Poetry"* ]] ; \
then \
echo "Found ${POETRY_VERSION}, ok." ; \
else \
echo 'Please install poetry first, with e.g.:' ; \
echo 'make install-poetry' ; \
exit 1 ; \
fi
install-poetry: ## install or update poetry
pip3 install -U poetry
install: check-poetry ## install python-poetry_publish via poetry
poetry install
update: check-poetry ## update the sources and installation
git fetch --all
git pull origin main
poetry update
lint: ## Run code formatters and linter
poetry run darker --diff --check
poetry run flake8 poetry_publish
fix-code-style: ## Fix code formatting
poetry run darker
poetry run flake8 poetry_publish
tox-listenvs: check-poetry ## List all tox test environments
poetry run tox --listenvs
tox: check-poetry ## Run pytest via tox with all environments
poetry run tox
tox-py36: check-poetry ## Run pytest via tox with *python v3.6*
poetry run tox -e py36
tox-py37: check-poetry ## Run pytest via tox with *python v3.7*
poetry run tox -e py37
tox-py38: check-poetry ## Run pytest via tox with *python v3.8*
poetry run tox -e py38
tox-py39: check-poetry ## Run pytest via tox with *python v3.9*
poetry run tox -e py39
tox-py310: check-poetry ## Run pytest via tox with *python v3.10*
poetry run tox -e py310
pytest: check-poetry ## Run pytest
poetry run pytest
update-rst-readme: ## update README.rst from README.creole
poetry run update_rst_readme
publish: ## Release new version to PyPi
poetry run publish
testpypi-publish: ## Release new version to test PyPi
poetry run publish --repository-url https://test.pypi.org
.PHONY: help install lint fix test publish