Skip to content

Conversation

3pleX-dev
Copy link
Contributor

This PR updates the build_wheel method to ensure consistent timestamps are used when generating wheel files.

While working on improving reproducible builds in nixpkgs#383885, I noticed that the current implementation relies on the system time when creating zip entries. This causes the resulting wheel files to vary between builds, even when the source hasn’t changed.

The fix:

  • Uses ZipInfo objects to explicitly control file timestamps
  • Respects the SOURCE_DATE_EPOCH convention (standard for reproducible builds)
  • Falls back to a fixed date if SOURCE_DATE_EPOCH is not defined

I'm happy to adjust the approach if there’s a better way to handle this — feedback is very welcome.

Copy link
Contributor

@philthompson10 philthompson10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you target the develop branch rather than main. Thanks.

@3pleX-dev 3pleX-dev changed the base branch from main to develop April 24, 2025 12:54
@philthompson10 philthompson10 merged commit 13fda02 into Python-SIP:develop Apr 24, 2025
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