-
-
Notifications
You must be signed in to change notification settings - Fork 62
/
Copy pathMakefile
41 lines (32 loc) · 1.2 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
.PHONY: all clean test test-release release publish-test publish env
VIRTUALENV_EXISTS := $(shell [ -d .venv ] && echo 1 || echo 0)
all: clean test
@python -c "print('OK')"
clean:
@python setup.py clean
@find src/ -name "*.so" | xargs rm -rf
@find . -name "*.pyc" | xargs rm -rf
@find . -name "__pycache__" | xargs rm -rf
@find . -name ".coverage" | xargs rm -rf
@rm -rf .coverage coverage.* .eggs/ .mypy_cache/ .pytype/ .ruff_cache/ .pytest_cache/ .tox/ src/Flask_JSONRPC.egg-info/ htmlcov/ junit/ htmldoc/ build/ dist/
test: clean
@python -m tox
test-release: clean test
@docker-compose -f docker-compose.test.yml build --build-arg VERSION=$(shell date +%s)
@docker-compose -f docker-compose.test.yml up
release: clean test
@python -m pip install --upgrade build
@python -m build
@MYPYC_ENABLE=1 python setup.py bdist_wheel
publish-test: clean release
@python -m pip install --upgrade twine
@python -m twine upload --repository testpypi dist/*
publish: clean release
@python -m pip install --upgrade twine
@python -m twine upload dist/*
env:
ifeq ($(VIRTUALENV_EXISTS), 0)
@python -m venv .venv
@.venv/bin/pip install --upgrade pip setuptools
@.venv/bin/pip install -r requirements/local.txt
endif