-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
BLD: Make a sdist [wheel build] #21095
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
Conversation
5a4f331
to
c9652a8
Compare
@tylerjereddy Do you need this PR for scipy to start migrating to cibuildwheel? I'm a little busy right now but I can try to find some time to finish up the last bits of this PR if its needed urgently. |
Nope, I was just curious and reading the code, for now. I suspect there be a bit of a "wait and see" before adopting in SciPy after NumPy embraces it. |
Nice. I like it that we can get the artifacts from the github action summary. The new sdist has a In both cases, the sdist includes the same unprocessed As for the numpy.egg-info directory, it seems to be a build artifact and I think should not be included in the sdist. |
|
My mistake, the |
22c23cf
to
eef9aec
Compare
Thanks for the reviews. I think the main issue right now is that the PEP 517 build is going through setuptools implicitly. This is fine, but it means that there are some changes. I think I got the license file issue resolved(it was because everything that matched Unfortunately, there is no way to remove .egg-info during the build, setuptools needs it to do their version of the MANIFEST thing. Maybe this is fine? (after all the wheels have .dist-info in them, and I'm pretty sure pip will regenerate wheel-info upon install of a sdist without one) Right now, it's proving to be a little bit of a pain to delete the folder from the tarball. I am willing to hack my way through the rest of this, but I just wanted to first get an opinion on using setuptools. IIUC, numpy is moving away from numpy.distutils/distutils, but I'm not sure whether the conversation on what build system numpy is moving to in the future got resolved. If setuptools is going to be the preferred way numpy is going to be built in the future, I think it would make sense for me to continue down this path. Otherwise, I think I'll table this until a new build system is decided upon and integrated. Regardless of build system choice, I think we should probably stick to the PEP 517 way of building sdists, as build isolation/clean environment of CI is probably the main reason for moving sdists building into the CI. |
Ah that explains it, thanks @lithomas1. We are going to move away from
We've done this since forever, and it's reliable. I don't see a problem keeping it like that for another release or two. |
@lithomas1 Off topic, but I will ask here. Do all the github wheel builds get tested? The OS X multibuild wheels have started failing on Python 3.8 and 3.9 (#21169), while all the github builds are getting uploaded to the nightly repo. I'm wondering is this is due to a lack of testing, or if the github builds are working better. |
They do get tested(running the "full" tests), but I'm not sure why they would only fail on Azure. I guess something in the configs is different? It might be an issue with the Azure builds as the regular CI here isn't failing. |
I'll have a look now, thanks for the ping @lithomas1 |
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.
This LGTM, only one comment left which can be taken care of in a follow-up (it also applies to wheel builds).
Thanks a lot @lithomas1!
github.event_name == 'workflow_dispatch' || | ||
(github.event_name == 'pull_request' && | ||
(contains(github.event.pull_request.labels.*.name, '36 - Build') || | ||
contains(github.event.pull_request.labels.*.name, '03 - Maintenance') || |
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.
Maintenance
is a very commonly used label and not particularly relevant for wheel/sdist builds, I would leave that one out.
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.
I see this is done for wheels too, and rationale given is:
# 03 - Maintenance(for dependency upgrades), and
This rationale is not correct; the total number of PRs with this label is ~2250. It can be safely dropped, dependency upgrades that are of interest are not coming in through PRs often (e.g., compilers, or distro BLAS). And if something goes wrong there, it will show up soon enough in the scheduled builds.
Upload to the Anaconda bucket will only happen from |
The manual trigger doesn't seem to work, is this known @lithomas1, or am I doing something wrong by pressing the trigger on the merge commit? |
The upload logic here doesn't seem quite right though, the wheels are getting uploaded while the sdist didn't: See https://github.com/numpy/numpy/runs/5572823596?check_suite_focus=true |
numpy/.github/workflows/wheels.yml Lines 242 to 245 in cf2d77a
This feature got added to cibuildwheel: |
No description provided.