Skip to content

Fix cibuildwheel build package shadowing - #465

Merged
vinay553 merged 2 commits into
masterfrom
codex/fix-cibuildwheel-build-shadow
Jun 17, 2026
Merged

Fix cibuildwheel build package shadowing#465
vinay553 merged 2 commits into
masterfrom
codex/fix-cibuildwheel-build-shadow

Conversation

@vinay553

@vinay553 vinay553 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Rename the custom Poetry build hook from build.py to native_build.py so it does not shadow the PyPI build package imported by cibuildwheel
  • Include native_build.py in the sdist and update the Poetry build script path
  • Bump the package to 0.18.7 for a new publish tag after the failed v0.18.6 tag workflow

Validation

  • poetry build
  • pytest tests/test_local_deduplication.py -q
  • pre-commit run --all-files
  • python -c "from build import ProjectBuilder; print(ProjectBuilder.__module__)" prints build._builder from repo root
  • python -m cibuildwheel --platform macos --print-build-identifiers starts successfully from repo root

Release note

The pushed v0.18.6 tag points at the commit with the publishing bug, so after merging this fix, publish with a new v0.18.7 tag.

Greptile Summary

  • Renames the custom Poetry build hook from build.py to native_build.py so it no longer shadows the PyPI build package.
  • Updates pyproject.toml to use and include the renamed build hook in source distributions.
  • Refreshes poetry.lock and bumps the package/changelog version to 0.18.7 for the corrected publish workflow.

Confidence Score: 5/5

The build hook rename and packaging metadata updates are narrow and align with the stated cibuildwheel import-shadowing fix.

The changed files are limited to release metadata, lockfile refresh, and the renamed build hook path; no review comments are needed.

T-Rex T-Rex Logs

What T-Rex did

  • Ran a Python one-liner to inspect the build module and observed an ImportError due to local build.py shadowing.
  • Reran the same import after the fix and confirmed it prints build._builder, and observed cibuildwheel progressing to print platform identifiers (cp39-macosx_x86_64 through cp314t-macosx_64) with exit code 0.
  • Captured the before-package build log showing the base command, working directory, exit code, pyproject metadata, poetry build output, and artifact listings.
  • Captured the after-package build log showing successful poetry build, wheel and sdist artifacts, and confirms the head build output with poetry build exit code 0.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (2): Last reviewed commit: "Refresh Poetry lockfile" | Re-trigger Greptile

Comment thread pyproject.toml
@vinay553
vinay553 requested a review from a team June 17, 2026 17:44
@vinay553
vinay553 merged commit 971afb1 into master Jun 17, 2026
9 checks passed
@vinay553
vinay553 deleted the codex/fix-cibuildwheel-build-shadow branch June 17, 2026 18:16
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.

2 participants