Skip to content

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

Closed
c4rtune wants to merge 1 commit into
mainfrom
test-branch
Closed

Removed six dependency in tools/git since it breaks hermetic builds#9
c4rtune wants to merge 1 commit into
mainfrom
test-branch

Conversation

@c4rtune
Copy link
Copy Markdown
Owner

@c4rtune c4rtune commented Apr 23, 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 tools/git/gen_git_source.py

🔍 The six dependency in gen_git_source.py is unnecessary because the script only uses standard Python libraries.

#2 tensorflow/tensorflow@c396546

🔍 The six dependency was added during the PY3 migration to ensure compatibility between Python 2 and 3, but it can break hermetic builds on systems where six is not installed.

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

🔍 The six dependency in gen_git_source.py was added during a cross-compatibility migration but can break hermetic builds on vanilla systems where six is not available.

#4 git_configure.bzl

🔍 The six dependency in git_configure.bzl can break hermetic builds on vanilla systems because it relies on the host Python environment.

@c4rtune c4rtune closed this Apr 23, 2026
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