-
Notifications
You must be signed in to change notification settings - Fork 239
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
Requesting better error message for Build failed because a pure Python wheel was generated.
#2038
Comments
If you are building Pure Python wheels, you can use If you want to test cibuildwheel, you need some compiled code in your wheel. See https://learn.scientific-python.org/development/guides/packaging-compiled/ for some help getting started adding compiled code to a project. That also has guides on making both pure and compiled wheels in CI. Better docs is a good idea, though. |
Oh I see, so I fundamentally misunderstood I guess then the error message could say:
Feel free to leave this open to expand this error message, or close this out |
I think that would be a good snippet to add (without compiled code cibuildwheel is unnecessary). FWIW, if you are using GHA, |
I started using https://github.com/henryiii/check-sdist in publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
- run: uv sync
- run: |-
uv build --sdist --wheel --out-dir dist/ .
uv publish
env:
UV_PUBLISH_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} Seeing this, would you advise to go from |
You can still run check-sdist. That doesn't even need to be in your publish pipeline, it's a check. There's an official setup-uv action, which also does some caching.
I'd still use the build-and-inspect step, as it does some checks, and it also uses uv internally, so it's fast. I'd recommend the two-stage structure you see there, for security reasons having as little happen in the publish job is nice. Trusted publishing is recommended over using a token. |
Hi @henryiii thanks for all the advice, I am in the midst of rolling out |
Description
I am trying to test usage of
cibuildwheel==2.21.2
on my Mac (macOS Sonoma v14.5) locally, and am following https://cibuildwheel.pypa.io/en/stable/setup/#localIt successfully makes the
wheelhouse
directory and builds, but then outputs:I see this error was added as part of #255. I have figured out this validation was added because one should use
build --wheel
.For me, I am actually just trying to test out
cibuildwheel
locally on my Mac, and I actually can't figure out how to use it 😓So this issue is halfway a request halfway a question:
Build log
No response
CI config
No response
The text was updated successfully, but these errors were encountered: