forked from XenonLab/xecd-rates-client-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (25 loc) · 862 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
30
31
32
33
.PHONY: help test package dist dist_test
.DEFAULT: help
VENV_NAME?=venv
PYTHON=${VENV_NAME}/bin/python3
PIP=${VENV_NAME}/bin/pip
TWINE=${VENV_NAME}/bin/twine
help:
@echo "make test - Run tests"
@echo "make package - Builds the package for use or deployment"
@echo "make dist - Uploads the package to pypi (will ask for credentials)"
@echo "make dist_test - Uploads the package to test.pypi (will ask for credentials)"
venv: ${VENV_NAME}/bin/activate
${VENV_NAME}/bin/activate: setup.py
test -d ${VENV_NAME} || python3 -m venv ${VENV_NAME}
${PIP} install wheel twine
${PYTHON} setup.py develop
touch ${VENV_NAME}/bin/activate
test: venv
${PYTHON} setup.py test
package: venv test
${PYTHON} setup.py sdist bdist_wheel
dist: package
${TWINE} upload dist/*
dist_test: package
${TWINE} upload --repository-url https://test.pypi.org/legacy/ dist/*