Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Python 3] use build and twine to publish source and wheel #3806

Merged
merged 1 commit into from
Sep 4, 2022

Conversation

eagleoflqj
Copy link
Contributor

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.

Signed-off-by: Qijia Liu <liumeo@pku.edu.cn>
@ericvergnaud
Copy link
Contributor

ericvergnaud commented Aug 6, 2022 via email

@parrt
Copy link
Member

parrt commented Aug 26, 2022

So we need to change all of our setup.py files? ping @ericvergnaud

@eagleoflqj
Copy link
Contributor Author

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.

@parrt
Copy link
Member

parrt commented Aug 28, 2022

Looks ok to me. thanks for info. @ericvergnaud ?

@ericvergnaud
Copy link
Contributor

Hi, I'm fine if it's tested. Is it ?

@parrt
Copy link
Member

parrt commented Aug 29, 2022

Looks like I can test with pypitest. didn't know that existed!

@parrt
Copy link
Member

parrt commented Sep 4, 2022

Confirmed. It just worked. https://pypi.org/project/antlr4-python3-runtime/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants