antlr4
antlr4 copied to clipboard
[Python 3] use build and twine to publish source and wheel
Closes #3805
I'm using Python 3.9. I tried python setup.py sdist upload -r pypitest but got
...
Writing antlr4-python3-runtime-4.10.1/setup.cfg
Creating tar archive
removing 'antlr4-python3-runtime-4.10.1' (and everything under it)
running upload
Submitting dist/antlr4-python3-runtime-4.10.1.tar.gz to https://test.pypi.org/legacy/
Upload failed (400): Invalid value for blake2_256_digest. Error: Use a valid, hex-encoded, BLAKE2 message digest.
error: Upload failed (400): Invalid value for blake2_256_digest. Error: Use a valid, hex-encoded, BLAKE2 message digest.
The answer seems using twine instead, and from the link there calling setup.py should be deprecated.
So I use build and twine to publish both source and wheel to test pypi.
I also gave a try to Python 2, but python -m build gave error. I don't want to bother with that since Python 2 has reached EOL for 2 years and half. I think ANTLR should drop Python 2 support some time.
Thanks I’ll look into this when I get back in 2 weeks. Give us a shout if I don’t.
Envoyé de mon iPhone
Le 6 août 2022 à 01:02, Liumeo @.***> a écrit :
Closes #3805
I'm using Python 3.9. I tried python setup.py sdist upload -r pypitest but got
... Writing antlr4-python3-runtime-4.10.1/setup.cfg Creating tar archive removing 'antlr4-python3-runtime-4.10.1' (and everything under it) running upload Submitting dist/antlr4-python3-runtime-4.10.1.tar.gz to https://test.pypi.org/legacy/ Upload failed (400): Invalid value for blake2_256_digest. Error: Use a valid, hex-encoded, BLAKE2 message digest. error: Upload failed (400): Invalid value for blake2_256_digest. Error: Use a valid, hex-encoded, BLAKE2 message digest. The answer seems using twine instead, and from the link there calling setup.py should be deprecated. So I use build and twine to publish both source and wheel to test pypi.
I also gave a try to Python 2, but python -m build gave error. I don't want to bother with that since Python 2 has reached EOL for 2 years and half. I think ANTLR should drop Python 2 support some time.
You can view, comment on, or merge this pull request online at:
https://github.com/antlr/antlr4/pull/3806
Commit Summary
8868d4a use build and twine to publish source and wheel File Changes (2 files) M .gitignore (2) M doc/releasing-antlr.md (13) Patch Links:
https://github.com/antlr/antlr4/pull/3806.patch https://github.com/antlr/antlr4/pull/3806.diff — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.
So we need to change all of our setup.py files? ping @ericvergnaud
It's not setup.py itself that is deprecated, but calling python setup.py sdist|bdist_wheel [upload] from cli. python -m build still reads content of setup.py. So no need to change any setup.py files.
Looks ok to me. thanks for info. @ericvergnaud ?
Hi, I'm fine if it's tested. Is it ?
Looks like I can test with pypitest. didn't know that existed!
Confirmed. It just worked. https://pypi.org/project/antlr4-python3-runtime/