diff mbox series

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

Message ID 20230802083058.67766-3-rjarry@redhat.com
State Superseded
Headers show
Series Python ovsdb bindings distribution improvements | expand

Checks

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

Commit Message

Robin Jarry Aug. 2, 2023, 8:27 a.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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mike Pattrick Aug. 4, 2023, 5:29 p.m. UTC | #1
On Wed, Aug 2, 2023 at 4:31 AM Robin Jarry <rjarry@redhat.com> wrote:

> 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
> <https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html#summaryReported-by>:
> Terry Wilson <twilson@redhat.com>
> Signed-off-by: Robin Jarry <rjarry@redhat.com>
>

Acked-by: Mike Pattrick <mkp@redhat.com>
Ilya Maximets Aug. 8, 2023, 8:25 p.m. UTC | #2
On 8/2/23 10:27, Robin Jarry wrote:
> 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.

Nit: It might be better to just use 2-space indentation or some other way
of writing quotes instead of '>' to avoid interpretation by mail clients.

> 
> 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 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/python/automake.mk b/python/automake.mk
> index 8b6266de214e..8854e656a5ae 100644
> --- a/python/automake.mk
> +++ b/python/automake.mk
> @@ -104,7 +104,7 @@ 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)
> +	(cd python/ && $(PYTHON3) setup.py sdist && twine upload dist/ovs-$(VERSION).tar.gz)

This target should just depend on python-sdist target where the first
part of the command is already defined.  No need for duplication.

Best regards, Ilya Maximets.
diff mbox series

Patch

diff --git a/python/automake.mk b/python/automake.mk
index 8b6266de214e..8854e656a5ae 100644
--- a/python/automake.mk
+++ b/python/automake.mk
@@ -104,7 +104,7 @@  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)
+	(cd python/ && $(PYTHON3) setup.py sdist && twine upload dist/ovs-$(VERSION).tar.gz)
 install-data-local: ovs-install-data-local
 
 UNINSTALL_LOCAL += ovs-uninstall-local