Skip to content

Commit 9bdf0c2

Browse files
seanpmorganWindQAQ
authored andcommitted
Build with the correct python version (#917)
1 parent 839c7d8 commit 9bdf0c2

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

tools/ci_build/builds/release_linux.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ add-apt-repository -y ppa:deadsnakes/ppa
3434
apt-get -y -qq update
3535

3636
for version in ${PYTHON_VERSIONS}; do
37-
export PYTHON_VERSION=${version}
38-
apt-get -y -qq install ${PYTHON_VERSION}
37+
apt-get -y -qq install ${version}
38+
ln -sf /usr/bin/${version} /usr/bin/python
3939

40-
${PYTHON_VERSION} get-pip.py -q
41-
${PYTHON_VERSION} -m pip --version
40+
python get-pip.py -q
41+
python -m pip --version
4242

4343
#Link TF dependency
4444
yes 'y' | ./configure.sh --quiet

tools/ci_build/builds/tf_auditwheel_patch.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
set -e
1818

19+
SITE_PKG_LOCATION=$(python -c "import site; print(site.getsitepackages()[0])")
1920
TF_SHARED_LIBRARY_NAME=$(grep -r TF_SHARED_LIBRARY_NAME .bazelrc | awk -F= '{print$2}')
20-
POLICY_JSON="/usr/local/lib/python3.6/dist-packages/auditwheel/policy/policy.json"
21+
POLICY_JSON="${SITE_PKG_LOCATION}/auditwheel/policy/policy.json"
2122
sed -i "s/libresolv.so.2\"/libresolv.so.2\", $TF_SHARED_LIBRARY_NAME/g" $POLICY_JSON

tools/ci_build/builds/wheel_verify.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ if [[ $(uname) == "Darwin" ]]; then
2020
CMD="delocate-wheel -w wheelhouse"
2121
elif [[ $(uname) == "Linux" ]]; then
2222
apt-get -y -qq update && apt-get install patchelf
23-
pip3.6 install -U auditwheel==2.0.0
23+
python -m pip install -U auditwheel==2.0.0
2424
tools/ci_build/builds/tf_auditwheel_patch.sh
2525
CMD="auditwheel repair --plat manylinux2010_x86_64"
2626
fi

0 commit comments

Comments
 (0)