Skip to content

Commit

Permalink
Fixed windows python3.6 issue.
Browse files Browse the repository at this point in the history
We are using python 3.6.1 which suffers from pypa/setuptools#2352 even with setuptools 50.0.1 (which should fix the "bug" for newer py36)

PiperOrigin-RevId: 329607958
  • Loading branch information
brills authored and tfx-copybara committed Sep 1, 2020
1 parent 170c391 commit 4715790
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions tfx_bsl/tools/windows/pip/build_tfx_bsl_windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,17 @@ function common::prepare_python_env() {
# Setting up the environment variables Bazel and ./configure needs.
source "${TFX_BSL_OUTPUT_DIR}/tfx_bsl/tools/windows/bazel/common_env.sh"

"${PYTHON_BIN_PATH}" -m pip install --upgrade pip
pip install --upgrade setuptools wheel
pip install "numpy>=1.16,<2"
"${PYTHON_BIN_PATH}" -m pip install --upgrade pip setuptools wheel "numpy>=1.16,<2"
pip list
# There's a tensorflow bazel rule that executes a small piece of code
# (https://github.com/tensorflow/tensorflow/blob/b36436b087bd8e8701ef51718179037cccdfc26e/third_party/py/python_configure.bzl#L150)
# to determine the path to python headers and that code doesn't work with
# setuptools>=50.0 and Python 3.6.1 (which is our testing set up). Setting
# this environment variable would revert setuptools to the old, good behavior.
# See https://github.com/pypa/setuptools/issues/2352
# Note that setuptools 50.0.1 claim to have "fixed" the issue but it
# did not work for Python 3.6.1 (newer 3.6 may work).
export SETUPTOOLS_USE_DISTUTILS=stdlib
}

function tfx_bsl::build_from_head_windows() {
Expand Down

0 comments on commit 4715790

Please sign in to comment.