-
Notifications
You must be signed in to change notification settings - Fork 247
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
Can I intentionally produce a pure Python non-platform wheel? #862
Comments
The workflows should be very different, though? In one case, you should run a single job that calls Why not have a reusable workflow (https://docs.github.com/en/actions/learn-github-actions/reusing-workflows) or composite action (https://docs.github.com/en/actions/creating-actions/creating-a-composite-action), and either use a setting or just ask users to select the pure Python or built one? I don't think it's that hard to ask someone who is able to write C extensions to select a different workflow option. |
See, for example, the workflows (not reusable, at least yet, just examples) at: https://scikit-hep.org/developer/gha_pure and https://scikit-hep.org/developer/gha_wheels. Those can't be merged into a single workflow even if cibuildwheel didn't throw an error - they are completely different long before cibuildwheel runs. |
That's a very good point and something I somehow failed to consider, haha. We currently do per-platform and source distribution builds in parallel so the wasted time would be cut down a bit thanks to that, but multiple builds does seem like a great reason not to do this.
Since reusable workflows only went into public beta this week, we've unfortunately not been able to take advantage of them yet, but that is very much something I plan to do in the future. We do currently use a composite action though. As much as I'd like to avoid adding a mandatory setting to our composite action, I think you're probably correct that it's the best option. Reusable workflows might save us here though, alleviating our maintainability concerns and making this option a bit more palatable. Thanks for responding so quickly, I think reusable workflows and an optional setting would be a satisfactory solution. |
Description
I understand per #255 why it may be undesirable for cibuildwheel to produce a pure-Python wheel since cibuildwheel has no a priori way to determine if this was intentional, so it must assume it was not; a reasonable assumption to make.
However, my use case involves wrapping cibuildwheel in a larger GitHub workflow for reuse within our organization, and we would prefer that the workflow abstract away the specifics of how the wheel is being built regardless of whether it is pure Python or platform specific, and avoid having to set some sort of
build_platform_wheel: true
property on a per-repository basis.I would really appreciate having the ability to pass an option to cibuildwheel so that it does not throw this error when this happens, and just builds the pure-Python wheel instead.
The only other workarounds I can envision are:
python -m pip wheel
(not easy to do within a GitHub Action, wastes time building twice)setup.py
options? grepping for*.c
and*.cpp
files? very brittle) and only use cibuildwheel if it doesIf this is already possible some other way I haven't thought of, I'd be quite grateful to know what it is.
Thanks!
Build log
https://github.com/zanecodes/tweakwcs/runs/3745689759?check_suite_focus=true
CI config
https://github.com/spacetelescope/action-publish_to_pypi/blob/master/build-wheel/action.yml
The text was updated successfully, but these errors were encountered: