Skip to content

[infra] investigate why macos-15 generated wheel does not pass twine check #1622

@kevinjqliu

Description

@kevinjqliu

Apache Iceberg version

None

Please describe the bug 🐞

Investigate why macos-15 generated wheel does not pass twine check, thus cannot be uploaded to pypi

Context:
While working on automating nightly build in #1601, macos-15 build artifacts had the below error when uploading to pypi. Since macos-14 generates the same artifacts, we just remove macos-15 from build os matrix.

Branch: https://github.com/apache/iceberg-python/compare/main...kevinjqliu:iceberg-python:kevinjqliu/add-back-macos15-to-build?expand=1
Example run: https://github.com/kevinjqliu/iceberg-python/actions/runs/13203537911

Error:

Checking 
dist/pyiceberg_kevinliu-0.9.0.dev20250207160558-cp311-cp311-macosx_11_0_arm64.wh
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 1349, in __init__
    self._RealGetContents()
  File "/usr/local/lib/python3.12/zipfile/__init__.py", line 1446, in _RealGetContents
    raise BadZipFile("Bad magic number for central directory")
zipfile.BadZipFile: Bad magic number for central directory
l: 

Reproduce:

twine check <bad file>

Willingness to contribute

  • I can contribute a fix for this bug independently
  • I would be willing to contribute a fix for this bug with guidance from the Iceberg community
  • I cannot contribute a fix for this bug at this time

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions