diff mbox series

[ovs-dev,v2,2/3] python: Use twine to upload sdist package to pypi.org.

Message ID 20230823144736.480791-3-rjarry@redhat.com
State Accepted
Commit f1983a508b38868ad3fc0be74686f8f914c95b9c
Headers show
Series Python ovsdb bindings distribution improvements | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/intel-ovs-compilation success test: success

Commit Message

Robin Jarry Aug. 23, 2023, 2:29 p.m. UTC
setup.py upload is now deprecated. When used, pypi.org returns an error:

  Upload failed (400): Invalid value for blake2_256_digest. Error: Use
  a valid, hex-encoded, BLAKE2 message digest.

Use twine which is the recommended replacement tool to upload on
pypi.org.

Link: https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html#summary
Reported-by: Terry Wilson <twilson@redhat.com>
Signed-off-by: Robin Jarry <rjarry@redhat.com>
---
 python/automake.mk | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/python/automake.mk b/python/automake.mk
index 6c7ac84b9c40..d9f6803691d7 100644
--- a/python/automake.mk
+++ b/python/automake.mk
@@ -112,11 +112,14 @@  ovs-install-data-local:
 	$(INSTALL_DATA) python/ovs/dirs.py.tmp $(DESTDIR)$(pkgdatadir)/python/ovs/dirs.py
 	rm python/ovs/dirs.py.tmp
 
+.PHONY: python-sdist
 python-sdist: $(srcdir)/python/ovs/version.py $(ovs_pyfiles) python/ovs/dirs.py
 	(cd python/ && $(PYTHON3) setup.py sdist)
 
-pypi-upload: $(srcdir)/python/ovs/version.py $(ovs_pyfiles) python/ovs/dirs.py
-	(cd python/ && $(PYTHON3) setup.py sdist upload)
+.PHONY: pypi-upload
+pypi-upload: python-sdist
+	twine upload python/dist/ovs-$(VERSION).tar.gz
+
 install-data-local: ovs-install-data-local
 
 UNINSTALL_LOCAL += ovs-uninstall-local