Skip to content
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

Repairing wheel fails on pypy37 with "This does not look like a platform wheel" #1247

Closed
CaselIT opened this issue Aug 24, 2022 · 4 comments
Closed

Comments

@CaselIT
Copy link

CaselIT commented Aug 24, 2022

Description

I'm trying to migrate sqlalchemy custom wheel build actions to cybuildwheel, and came across this issue when cibuildwheel attemps to build the wheel for pypy3.7 on linux.

Since these are test build they include the tag_build = dev, not sure if it may be related.

Relevant section of the logs

Building pp37-manylinux_x86_64 wheel
PyPy 3.7 manylinux x86_64

Setting up build environment...
  
      + /opt/python/cp38-cp38/bin/python -c 'import sys, json, os; json.dump(os.environ.copy(), sys.stdout)'
      + which python
      + which pip
                                                              ✓ 0.03s
Building wheel...
  
      + rm -rf /tmp/cibuildwheel/built_wheel
      + mkdir -p /tmp/cibuildwheel/built_wheel
      + python -m pip wheel /project --wheel-dir=/tmp/cibuildwheel/built_wheel --no-deps
  Processing /project
    Installing build dependencies: started
    Installing build dependencies: finished with status 'done'
    Getting requirements to build wheel: started
    Getting requirements to build wheel: finished with status 'done'
    Preparing metadata (pyproject.toml): started
    Preparing metadata (pyproject.toml): finished with status 'done'
  Building wheels for collected packages: SQLAlchemy
    Building wheel for SQLAlchemy (pyproject.toml): started
    Building wheel for SQLAlchemy (pyproject.toml): finished with status 'done'
    Created wheel for SQLAlchemy: filename=SQLAlchemy-2.0.0b1.dev0-pp37-pypy37_pp73-linux_x86_64.whl size=1699279 sha256=2cc5e2382df15b2383048bb8f83ffa553b0d0ad2eaec45d862d34250c64eb406
    Stored in directory: /tmp/pip-ephem-wheel-cache-is0jrf62/wheels/51/1e/86/e35ee69f9e0f5a748fdf1aa69c135ed26d3f41555386024d6a
  Successfully built SQLAlchemy
      + /opt/python/cp38-cp38/bin/python -c 'import sys, json, glob; json.dump(glob.glob('"'"'/tmp/cibuildwheel/built_wheel/*.whl'"'"'), sys.stdout)'
      + rm -rf /tmp/cibuildwheel/repaired_wheel
      + mkdir -p /tmp/cibuildwheel/repaired_wheel
                                                             ✓ 10.68s
Repairing wheel...
  
      + sh -c 'auditwheel repair -w /tmp/cibuildwheel/repaired_wheel /tmp/cibuildwheel/built_wheel/SQLAlchemy-2.0.0b1.dev0-pp37-pypy37_pp73-linux_x86_64.whl'
  INFO:auditwheel.main_repair:Repairing SQLAlchemy-2.0.0b1.dev0-pp37-pypy37_pp73-linux_x86_64.whl
  INFO:auditwheel.main_repair:This does not look like a platform wheel

Sqlalchemy currently doesn't provide pypy builds so this is not a blocking issue in migrating to cibuildwheel, (and it seems our test suite is somewhat broken on pypy, at least on windows), but it seems worth reporting

btw thanks for automatic the build creation, previously a custom action was used that did basically the same thing (build wheel, install it, test it and publish)

Configuration file https://github.com/CaselIT/sqlalchemy/blob/5872213aa4d0b7cec6aa5f439be98e041e0940f1/pyproject.toml#L65-L76

(it may be worth providing a place for the config file link)

Build log

https://github.com/CaselIT/sqlalchemy/runs/8001933154?check_suite_focus=true

CI config

https://github.com/CaselIT/sqlalchemy/blob/5872213aa4d0b7cec6aa5f439be98e041e0940f1/.github/workflows/cibuildwheels.yaml

@Czaki
Copy link
Contributor

Czaki commented Aug 24, 2022

Based on checks, it may be some problem with the wheel. The best option for debugging it will be to download the wheel and check its content as this error means a lack of ELF files:

https://github.com/pypa/auditwheel/blob/main/src/auditwheel/wheel_abi.py#L51

You may use CIBW_REPAIR_WHEEL_COMMAND to disable wheel repair steep.
https://cibuildwheel.readthedocs.io/en/stable/options/#repair-wheel-command

@CaselIT
Copy link
Author

CaselIT commented Aug 24, 2022

oh ok, the error was not clear to me at all!
Reading the provided code it happen if there are no compiled files in the wheels, and that's indeed the case, since sqlalchemy cython parts are not build for pypy (that will use the pure python fallback)

I would suggest providing a better log, something like This does not look like a platform wheel, no compiled extension found or similar wording

I think this can be closed, thanks for the pointer!

@CaselIT CaselIT closed this as completed Aug 24, 2022
@henryiii
Copy link
Contributor

If you have a pure Python fallback, I'd publish a pure Python wheel + CPython platform wheels. You can build the pure Python wheel with build. And the error comes from auditwheel, not us, in this case. :)

@CaselIT
Copy link
Author

CaselIT commented Aug 24, 2022

If you have a pure Python fallback, I'd publish a pure Python wheel + CPython platform wheels. You can build the pure Python wheel with build. And the error comes from auditwheel, not us, in this case. :)

Yes, I'll do that. I've provided a PR to auditwheel to hopefully clarify the log message

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

No branches or pull requests

3 participants