Skip to content

Fix PyPI upload failures from colliding macOS wheel artifacts - #137

Merged
Huelse merged 1 commit into
mainfrom
fix/wheel-artifact-name-collision
Aug 3, 2026
Merged

Fix PyPI upload failures from colliding macOS wheel artifacts#137
Huelse merged 1 commit into
mainfrom
fix/wheel-artifact-name-collision

Conversation

@Huelse

@Huelse Huelse commented Aug 3, 2026

Copy link
Copy Markdown
Owner

macos-latest (macOS 26) and macos-15 are both arm64, so with CIBW_ARCHS_MACOS=auto64 both jobs produced identically named *-macosx_11_0_arm64.whl files with different contents. The publish job extracted both artifacts into dist/ via merge-multiple, letting two concurrent writers target the same path. The resulting wheels had local file headers disagreeing with the central directory, which PyPI rejects with "Invalid distribution file. ZIP archive not accepted: Mis-matched data size".

  • Drop the duplicate macos-15 matrix entry.
  • Download each artifact into its own subdirectory and fail loudly if two build jobs emit the same distribution name.
  • Replace the zipfile.testzip() check, which only reads the central directory, with the structural checks PyPI actually applies: local header vs central directory name/CRC/sizes, no data descriptors, and no trailing data after the end-of-central-directory record.

macos-latest (macOS 26) and macos-15 are both arm64, so with
CIBW_ARCHS_MACOS=auto64 both jobs produced identically named
*-macosx_11_0_arm64.whl files with different contents. The publish job
extracted both artifacts into dist/ via merge-multiple, letting two
concurrent writers target the same path. The resulting wheels had local
file headers disagreeing with the central directory, which PyPI rejects
with "Invalid distribution file. ZIP archive not accepted: Mis-matched
data size".

- Drop the duplicate macos-15 matrix entry.
- Download each artifact into its own subdirectory and fail loudly if two
  build jobs emit the same distribution name.
- Replace the zipfile.testzip() check, which only reads the central
  directory, with the structural checks PyPI actually applies: local
  header vs central directory name/CRC/sizes, no data descriptors, and no
  trailing data after the end-of-central-directory record.
@Huelse
Huelse merged commit 57de035 into main Aug 3, 2026
4 checks passed
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

Successfully merging this pull request may close these issues.

1 participant