Skip to content

fix(sources): exclude .git from configured tarball sdists - #1417

Merged
LalatenduMohanty merged 1 commit into
python-wheel-build:new-resolver-configfrom
LalatenduMohanty:fix-tarball-sdist-exclude-vcs
Nov 1, 2026
Merged

LalatenduMohanty merged 1 commit into
python-wheel-build:new-resolver-configfrom
LalatenduMohanty:fix-tarball-sdist-exclude-vcs

Conversation

@LalatenduMohanty

@LalatenduMohanty LalatenduMohanty commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

With build_sdist: tarball, fromager repacks the source tree as the sdist. For a git checkout, that tree includes .git, so the sdist shipped the whole repository history.

This passes exclude_vcs=True on the configured tarball path only. Packages without source: are unchanged.

Only the sdist leaves out .git. The wheel is still built from the source tree in the work directory, so builds that need git metadata (for example, git rev-parse HEAD in setup.py) still work. This matches pep517, which also never puts .git in an sdist.

Found in the review of #1414.

🤖 Generated with Claude Code

@LalatenduMohanty
LalatenduMohanty requested a review from a team as a code owner October 30, 2026 19:46
@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mergify mergify Bot added the ci label Oct 30, 2026
@LalatenduMohanty
LalatenduMohanty force-pushed the fix-tarball-sdist-exclude-vcs branch from 2e16316 to 5494a60 Compare October 30, 2026 19:48
@LalatenduMohanty LalatenduMohanty changed the title fix(sources): leave .git out of configured tarball sdists fix(sources): exclude .git from configured tarball sdists Oct 30, 2026
With `build_sdist: tarball`, a git checkout's `.git` ended up in the
sdist. Pass `exclude_vcs=True` on the configured tarball path.
Packages without `source:` are unchanged.

Co-Authored-By: Claude <claude@anthropic.com>
Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>

@rd4398 rd4398 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good! Thanks

@mergify

mergify Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

Comment thread src/fromager/sources.py Resolved
@LalatenduMohanty
LalatenduMohanty merged commit bc443f2 into python-wheel-build:new-resolver-config Nov 1, 2026
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants