From 20e9af292414795024c14b39ebebca85c7b7a766 Mon Sep 17 00:00:00 2001 From: Christina D'Astolfo Date: Thu, 11 Nov 2021 15:53:57 -0500 Subject: [PATCH 1/2] Use twine to upload packages to pypi and test pypi. Remove registration commands from makefile, as pre-registration is no longer required and the pypi api no longer supports it Specify verison of twine that works with python 3.6 and 3.7 --- Makefile | 12 ++---------- requirements.txt | 1 + 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index d2066a63..2e5a48fd 100644 --- a/Makefile +++ b/Makefile @@ -10,21 +10,13 @@ endef .PHONY: docs -pypi_register_test: install - $(call header,"Registering with PyPi - test") - @. $(INSTALL_DIR)/bin/activate; python setup.py register -r pypitest - -pypi_register: install - $(call header,"Registering with PyPi") - @. $(INSTALL_DIR)/bin/activate; python setup.py register -r pypi - pypi_upload_test: install $(call header,"Uploading new version to PyPi - test") - @. $(INSTALL_DIR)/bin/activate; python setup.py sdist upload -r pypitest + @. $(INSTALL_DIR)/bin/activate; python setup.py sdist twine upload --repository testpypi dist/* pypi_upload: install $(call header,"Uploading new version to PyPi") - @. $(INSTALL_DIR)/bin/activate; python setup.py sdist upload -r pypi + @. $(INSTALL_DIR)/bin/activate; python setup.py sdist twine upload dist/* docs: install $(call header,"Building docs") diff --git a/requirements.txt b/requirements.txt index ede372dd..0f5cdaef 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,3 +12,4 @@ six==1.16.0 Sphinx==1.7.5 tox-pyenv==1.1.0 tox==3.14.6 +twine==3.3.0 From 86923746ade09a33da7f0a5f6deb1d3cdb41b489 Mon Sep 17 00:00:00 2001 From: Christina D'Astolfo Date: Mon, 15 Nov 2021 13:55:43 -0500 Subject: [PATCH 2/2] Separate twine upload command to new line --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2e5a48fd..885f74ad 100644 --- a/Makefile +++ b/Makefile @@ -12,11 +12,13 @@ endef pypi_upload_test: install $(call header,"Uploading new version to PyPi - test") - @. $(INSTALL_DIR)/bin/activate; python setup.py sdist twine upload --repository testpypi dist/* + @. $(INSTALL_DIR)/bin/activate; python setup.py sdist + @twine upload --repository testpypi dist/* pypi_upload: install $(call header,"Uploading new version to PyPi") - @. $(INSTALL_DIR)/bin/activate; python setup.py sdist twine upload dist/* + @. $(INSTALL_DIR)/bin/activate; python setup.py sdist + @twine upload dist/* docs: install $(call header,"Building docs")