Make default PYTHON_LIB_PATH deterministic.

Before, the default PYTHON_LIB_PATH chosen was non-deterministically. This meant if ./configure was rerun and a different PYTHON_LIB_PATH was chosen, bazel would rebuild TF from scratch.

PiperOrigin-RevId: 356731041
Change-Id: Iefdebd0f6bb106a598f77e95cd36df87bb1c5d68
This commit is contained in:
Reed Wanderman-Milne 2021-02-10 07:41:07 -08:00 committed by TensorFlower Gardener
parent d29d3d8fc6
commit 03bd8a34ed

View File

@ -184,6 +184,8 @@ def get_python_path(environ_cp, python_bin_path):
]
all_paths = set(python_paths + library_paths)
# Sort set so order is deterministic
all_paths = sorted(all_paths)
paths = []
for path in all_paths: