-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
29 lines (21 loc) · 884 Bytes
/
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
.PHONY: install test_local test clean build upload_test upload
PYTHON ?= docker-compose run --rm --entrypoint python --user $$(id -u):$$(id -g) python
PIP ?= docker-compose run --rm --entrypoint pip --user $$(id -u):$$(id -g) python
PYPIRC ?= /python/.pypirc
install:
${PIP} install --user --upgrade -r test-requirements.txt
test:
${PYTHON} -m pytest
test_package:
${PYTHON} setup.py test
clean:
rm -rf .cache/ .eggs/ build/ dist/ *.egg-info
build: clean
${PYTHON} setup.py sdist bdist_wheel
# The "upload" tasks require a "~/.pypicrc" file
# @link https://docs.python.org/3/distutils/packageindex.html#pypirc
# @link https://packaging.python.org/guides/using-testpypi/#setting-up-testpypi-in-pypirc
upload_test: build
${PYTHON} -m twine upload --config-file ${PYPIRC} --repository testpypi dist/*
upload: build
${PYTHON} -m twine upload --config-file ${PYPIRC} dist/*