Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Posting this for visibility, so other people can find it.

I've updated my old GH Actions config to the latest cbuildwheel deploy example and could get it to work.
After a few hours of debugging, I figured out, that


          - os: macos-intel
            runs-on: macos-13
          - os: macos-arm
            runs-on: macos-latest

Produce exactly the same files (both arm and x86-x64), but twice.

When the download step executes, it corrupts wheels when merging since they have the same names:

    steps:
      - uses: actions/download-artifact@v4
        with:
          # unpacks all CIBW artifacts into dist/
          pattern: cibw-*
          path: dist
          merge-multiple: true

This results in the following error:

Traceback (most recent call last):
  File "/root/.local/bin/twine", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/root/.local/lib/python3.12/site-packages/twine/__main__.py", line 33, in main
    error = cli.dispatch(sys.argv[1:])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/lib/python3.12/site-packages/twine/cli.py", line 139, in dispatch
    return main(args.args)
           ^^^^^^^^^^^^^^^
  File "/root/.local/lib/python3.12/site-packages/twine/commands/check.py", line 195, in main
    return check(parsed_args.dists, strict=parsed_args.strict)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/lib/python3.12/site-packages/twine/commands/check.py", line 141, in check
    warnings, is_ok = _check_file(filename, render_warning_stream)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/lib/python3.12/site-packages/twine/commands/check.py", line 84, in _check_file
    package = package_file.PackageFile.from_filename(filename, comment=None)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/lib/python3.12/site-packages/twine/package.py", line 202, in from_filename
    data = dist.read()
           ^^^^^^^^^^^
  File "/root/.local/lib/python3.12/site-packages/twine/wheel.py", line 56, in read
    archive = zipfile.ZipFile(fqn)
              ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/zipfile/__init__.py", line [135](https://github.com/rushter/selectolax/actions/runs/15668298232/job/44135583456#step:3:141)4, in __init__
    self._RealGetContents()
  File "/usr/local/lib/python3.12/zipfile/__init__.py", line 1451, in _RealGetContents
    raise BadZipFile("Bad magic number for central directory")
zipfile.BadZipFile: Bad magic number for central directory
Checking dist/selectolax-0.3.30-cp310-cp310-macosx_10_9_x86_64.whl:

The reason on why this happens is because I had the following option set in my pyproject.toml:

macos.archs = ["x86_64", "arm64"]

Such setup conflicts and this line should be removed from the pyproject.toml file. Alternatively, only one version of macos can be kept in the matrix section.

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant
Morty Proxy This is a proxified and sanitized view of the page, visit original site.