forked from tensorflow/io
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request tensorflow#193 from yongtang/python3.7
Enable Python 3.7 build
- Loading branch information
Showing
4 changed files
with
102 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
#!/usr/bin/env bash | ||
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# ============================================================================== | ||
set -e -x | ||
|
||
# Release: | ||
# docker run -i -t --rm -v $PWD:/v -w /v --net=host ubuntu:16.04 /v/.travis/python3.7+.release.sh | ||
|
||
|
||
apt-get -y -qq update && apt-get -y -qq install \ | ||
software-properties-common \ | ||
gcc g++ make patch \ | ||
unzip curl patchelf | ||
|
||
add-apt-repository -y ppa:deadsnakes/ppa | ||
|
||
apt-get -y -qq update | ||
|
||
curl -sSOL https://bootstrap.pypa.io/get-pip.py | ||
|
||
export PYTHON_VERSION="python3.7" | ||
if [[ "$#" -gt 0 ]]; then | ||
export PYTHON_VERSION="${1}" | ||
shift | ||
fi | ||
|
||
apt-get -y -qq update && apt-get -y -qq install $PYTHON_VERSION | ||
$PYTHON_VERSION get-pip.py -q | ||
$PYTHON_VERSION -m pip --version | ||
|
||
export TENSORFLOW_INSTALL="$(${PYTHON_VERSION} setup.py --package-version)" | ||
if [[ "$#" -gt 0 ]]; then | ||
export TENSORFLOW_INSTALL="${1}" | ||
shift | ||
fi | ||
export BAZEL_VERSION=0.24.1 BAZEL_OS=$(uname | tr '[:upper:]' '[:lower:]') | ||
|
||
|
||
|
||
curl -sSOL https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-installer-${BAZEL_OS}-x86_64.sh | ||
bash -e bazel-${BAZEL_VERSION}-installer-${BAZEL_OS}-x86_64.sh 2>&1 > bazel-install.log || (cat bazel-install.log && false) | ||
bazel version | ||
|
||
$PYTHON_VERSION -m pip install -q "${TENSORFLOW_INSTALL}" | ||
$PYTHON_VERSION -c 'import tensorflow as tf; print(tf.version.VERSION)' | ||
$PYTHON_VERSION config_helper.py | ||
|
||
bash -x -e .travis/bazel.build.sh | ||
|
||
|
||
if [[ "$1" == "--"* ]]; then | ||
VERSION_CHOICE=$1 | ||
VERSION_NUMBER=$2 | ||
shift | ||
shift | ||
fi | ||
|
||
$PYTHON_VERSION setup.py --data bazel-bin -q bdist_wheel $VERSION_CHOICE $VERSION_NUMBER | ||
ls dist/* | ||
|
||
$PYTHON_VERSION -m pip install -q wheel==0.31.1 | ||
$PYTHON_VERSION -m pip install -q auditwheel==1.5.0 | ||
auditwheel --version | ||
for f in dist/*.whl; do | ||
auditwheel repair $f | ||
done | ||
ls wheelhouse/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters