From 1f78c6d9ee147c56b1a0479d03961ed36bd2e056 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Wed, 5 Jul 2017 12:49:58 +0200 Subject: [PATCH] Makefile targets for PyPi --- Makefile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Makefile b/Makefile index 5e29a3c7..b7a5672a 100644 --- a/Makefile +++ b/Makefile @@ -105,6 +105,26 @@ rpm: tarball test-rpm: tarball $(RPM_WITH_DIRS) $(DIST_DEFINES) --define "testbuild 1" -bb $(SPECFILE) +pypi: + rm -rf dist + python setup.py sdist + # py2 + virtualenv build_py2 + build_py2/bin/pip install --upgrade pip setuptools wheel virtualenv + build_py2/bin/python setup.py bdist_wheel + rm -rf build_py2 + # py3 + python3 -m venv build_py3 + build_py3/bin/pip install --upgrade pip setuptools wheel virtualenv + build_py3/bin/python setup.py bdist_wheel + rm -rf build_py3 + +pypi-upload-test: + twine upload -r https://test.pypi.org/legacy/ dist/* + +pypi-upload: + twine upload dist/* + tag:: git tag -a $(TAG) @echo "Tagged with: $(TAG)"