Skip to content

Commit 664b6d2

Browse files
authored
Merge pull request #25 from yongtang/travis
Update to build tensorflow-io pypi.org packages
2 parents ca634fd + d4988f3 commit 664b6d2

File tree

3 files changed

+60
-2
lines changed

3 files changed

+60
-2
lines changed

build_pip_pkg.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ function main() {
3636
exit 1
3737
fi
3838

39+
if [[ "$(auditwheel --version || true)" != *"installed"* ]]; then
40+
echo "No auditwheel installed"
41+
exit 1
42+
fi
43+
3944
# Create the directory, then do dirname on a non-existent file inside it to
4045
# give us an absolute paths with tilde characters resolved to the destination
4146
# directory.
@@ -59,7 +64,7 @@ function main() {
5964

6065
python setup.py bdist_wheel
6166

62-
cp dist/*.whl "${DEST}"
67+
auditwheel repair -w "${DEST}" dist/*.whl
6368
popd
6469
rm -rf ${TMPDIR}
6570
echo $(date) : "=== Output wheel file is in: ${DEST}"

release.sh

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#!/usr/bin/env bash
2+
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
# ==============================================================================
16+
set -e
17+
set -x
18+
19+
# Release:
20+
# docker run -it -v ${PWD}:/working_dir -w /working_dir tensorflow/tensorflow:custom-op bash -x /working_dir/release.sh <2.7|3.4|3.5|3.6>
21+
22+
PLATFORM="$(uname -s | tr 'A-Z' 'a-z')"
23+
24+
if [[ -z "${1}" ]]; then
25+
echo "usage:" $0 "<2.7|3.4|3.5|3.6>"
26+
exit 1
27+
fi
28+
29+
PYTHON_VERSION=$1
30+
31+
if [[ "3.5" == "${PYTHON_VERSION}" ]] || [ "3.6" == "${PYTHON_VERSION}" ]; then
32+
# fkrull/deadsnakes is for Python3.5
33+
add-apt-repository -y ppa:fkrull/deadsnakes
34+
apt-get update
35+
36+
apt-get install -y --no-install-recommends python${PYTHON_VERSION} libpython${PYTHON_VERSION}-dev
37+
wget -q https://bootstrap.pypa.io/get-pip.py
38+
python${PYTHON_VERSION} get-pip.py
39+
rm -f get-pip.py
40+
pip${PYTHON_VERSION} install --upgrade pip
41+
fi
42+
43+
rm -f /usr/bin/python /usr/bin/pip
44+
ln -s /usr/bin/python${PYTHON_VERSION} /usr/bin/python
45+
ln -s /usr/bin/pip${PYTHON_VERSION} /usr/bin/pip
46+
47+
./configure.sh
48+
49+
bazel build build_pip_pkg
50+
51+
bazel-bin/build_pip_pkg artifacts
52+
53+
exit 0

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from setuptools import setup
2222
from setuptools.dist import Distribution
2323

24-
__version__ = '0.0.1'
24+
__version__ = '0.1.0'
2525
REQUIRED_PACKAGES = [
2626
'tensorflow >= 1.12.0',
2727
]

0 commit comments

Comments
 (0)