Skip to content

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

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

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

Conversation

@c4rtune
Copy link
Copy Markdown
Owner

@c4rtune c4rtune commented Apr 20, 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 six dependency in git_configure.bzl was added during a cross-compatibility migration but can break hermetic builds on vanilla systems where six is not available.

#2 tools/git/gen_git_source.py

🔍 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.

#3 tensorflow/tensorflow@c396546

🔍 The six dependency was added during the PY3 migration to ensure compatibility across Python 2 and 3 environments.

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

🔍 The six dependency in gen_git_source.py is unnecessary because the script only uses standard Python libraries, making it compatible with hermetic builds without external packages.

@c4rtune c4rtune closed this Apr 21, 2026
@c4rtune c4rtune deleted the pull/36830 branch April 21, 2026 18:51
@c4rtune c4rtune restored the pull/36830 branch April 22, 2026 06:52
@c4rtune c4rtune deleted the pull/36830 branch April 22, 2026 08:20
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