-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add support for python 3.11 #5
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for putting this PR together. A couple of minor changes.
The cython generated C code is different for 3.11 vs 3.10, so relying on pip using an sdist with that file included doesn't work. That is to say, that "pip install sha256" doesn't work on 3.11 with the 0.3 release on pypi. This change updates setup.py to the current recommendation from cython (which removes the sdist step). It adds a pyproject.toml so that cython is recognized as a build-time dependency in recent pip versions. Package classifiers are updated to include 3.11 and 3.12, and dropping the EOL 3.7. Finally the sha256 package version is updated to 1.0 to prepare for a future release.
Thanks for the additional changes. I checked out the code but not sure the right way to test and then package it for uploading to PyPI. Seems like there needs to be a requirements-dev.txt for Cython to be installed in order for these to work from a newly checkout virtual environment:
and then I can use twine for the upload. Want to make sure I document the right commands for repeatable builds and uploads. |
Some of this is new to me too. :) But as I currently understand it:
Then the new way to build and upload would be (according to https://packaging.python.org/en/latest/tutorials/packaging-projects/ ):
I think that will work without any additional requirements files because the cython dep is specified in pyproject.toml and the "build" and "pip" commands use that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
The cython generated C code is different for 3.11 vs 3.10, so relying on pip using an sdist with that file included doesn't work. That is to say, that "pip install sha256" doesn't work on 3.11 with the 0.3 release on pypi.
This change updates setup.py to the current recommendation from cython (which removes the sdist step). It adds a pyproject.toml so that cython is recognized as a build-time dependency in recent pip versions. Package classifiers are updated to include 3.11. Finally the sha256 package version is updated to 0.4 to prepare for a future release.