Skip to content

fix: use pypa/build to create Python sdists and wheels #4850

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

Merged
merged 5 commits into from
Jul 30, 2025

Conversation

ataraxia937
Copy link
Contributor

@ataraxia937 ataraxia937 commented Jul 2, 2025

Using wheel directly generates whl files that aren't compliant with
https://packaging.python.org/en/latest/specifications/binary-distribution-format/#escaping-and-unicode
. Specifically, periods in the distribution name aren't converted to
underscores like setuptools would do. When uploading such a wheel to
PyPi, you get an email notification from them complaining about it and
warning that soon it would be denied.

However, running setup.py directly to do create a bdist_wheel now
produces a deprecation warning. The upstream advice is to use the
pypa/build module to wrap setuptools, so that's what I implemented
here. The Python target no longer depends on wheel directly, so I
removed it.

ataraxia937 and others added 3 commits July 2, 2025 08:05
Using wheel directly generates whl files that aren't compliant with
https://packaging.python.org/en/latest/specifications/binary-distribution-format/#escaping-and-unicode
. Specifically, periods in the distribution name aren't converted to
underscores like setuptools would do. When uploading such a wheel to
PyPi, you get an email notification from them complaining about it and
warning that soon it would be denied.

However, running setup.py directly to do create a `bdist_wheel` now
produces a deprecation warning. The upstream advice is to use the
`pypa/build` module to wrap setuptools, so that's what I implemented
here. The Python target no longer depends on `wheel` directly, so I
removed it.
@ataraxia937
Copy link
Contributor Author

I've updated the snapshots for this change. I don't know how I forgot to do that when I opened the PR.

mrgrain
mrgrain previously approved these changes Jul 30, 2025
Copy link
Contributor

mergify bot commented Jul 30, 2025

Thank you for contributing! ❤️ I will now look into making sure the PR is up-to-date, then proceed to try and merge it!

@mergify mergify bot added the pr/ready-to-merge This PR is ready to be merged. label Jul 30, 2025
Copy link
Contributor

mergify bot commented Jul 30, 2025

Merging (with squash)...

Copy link
Contributor

mergify bot commented Jul 30, 2025

This pull request has been removed from the queue for the following reason: pull request branch update failed.

The pull request can't be updated.

You should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue, you can requeue the pull request, without updating it, by posting a @mergifyio requeue comment.

@mrgrain
Copy link
Contributor

mrgrain commented Jul 30, 2025

@Mergifyio requeue

@mrgrain
Copy link
Contributor

mrgrain commented Jul 30, 2025

@Mergifyio update

Copy link
Contributor

mergify bot commented Jul 30, 2025

requeue

✅ The queue state of this pull request has been cleaned. It can be re-embarked automatically

Copy link
Contributor

mergify bot commented Jul 30, 2025

update

❌ Mergify doesn't have permission to update

For security reasons, Mergify can't update this pull request. Try updating locally.
GitHub response: refusing to allow a GitHub App to create or update workflow .github/workflows/main.yml without workflows permission

Copy link
Contributor

mergify bot commented Jul 30, 2025

This pull request has been removed from the queue for the following reason: pull request branch update failed.

The pull request can't be updated.

You should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue, you can requeue the pull request, without updating it, by posting a @mergifyio requeue comment.

@mergify mergify bot dismissed mrgrain’s stale review July 30, 2025 10:25

Pull request has been modified.

Copy link
Contributor

mergify bot commented Jul 30, 2025

Merging (with squash)...

@mergify mergify bot merged commit 49b5d3a into aws:main Jul 30, 2025
29 checks passed
@mergify mergify bot removed the pr/ready-to-merge This PR is ready to be merged. label Jul 30, 2025
@ataraxia937 ataraxia937 deleted the python_build branch July 30, 2025 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants