Skip to content

Removed six dependency in tools/git since it breaks hermetic builds#6

Closed
c4rtune wants to merge 1 commit intomainfrom
pull/36830
Closed

Removed six dependency in tools/git since it breaks hermetic builds#6
c4rtune wants to merge 1 commit intomainfrom
pull/36830

Conversation

@c4rtune
Copy link
Copy Markdown
Owner

@c4rtune c4rtune commented Apr 22, 2026

git_configure.bzl uses the host python to run tools/git/gen_git_source.py

It looks like in a cross compatibility migration (tensorflow/tensorflow@c396546) a six dependency was added. If building on a completely vanilla system, this will break if six is not installed on the host. Ideally, this should be done with python provided by bazel, but these rules are called during tf_workspace, bind, etc... So I think this approach is acceptable.

Small change, but also adds consistency! See https://github.com/tensorflow/tensorflow/blob/master/tensorflow/tools/git/gen_git_source.py#L171

@MonnetalX
Copy link
Copy Markdown

🔍 PR Link Analysis

🔗 Ranked Links

#1 git_configure.bzl

🔍 The host Python script in git_configure.bzl should avoid importing six to maintain hermetic builds on systems without it.

#2 tools/git/gen_git_source.py

🔍 The six library dependency in tools/git/gen_git_source.py breaks hermetic builds because it relies on the host Python environment having six installed, which is not guaranteed in a clean build system.

#3 tensorflow/tensorflow@c396546

🔍 The commit introduced a six dependency in gen_git_source.py that breaks hermetic builds when six is not available on the host system.

#4 https://github.com/tensorflow/tensorflow/blob/master/tensorflow/tools/git/gen_git_source.py#L171

🔍 Removing the six dependency from tools/git/gen_git_source.py ensures hermetic builds by eliminating reliance on an external Python package that may not be available on vanilla systems.

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