aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/tools/ci_build/protobuf
diff options
context:
space:
mode:
authorGravatar Jonathan Hseu <jhseu@google.com>2016-12-12 15:08:29 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-12-12 15:23:14 -0800
commite0587d1d504d60188938469cb662d2e809ec0206 (patch)
tree583288f3585b2824257c253587068fdbe0634c55 /tensorflow/tools/ci_build/protobuf
parente43b4e4dec711d9281f78752278042d18a8bef4e (diff)
Script to build an optimized version of the protobuf package in CI.
Change: 141815820
Diffstat (limited to 'tensorflow/tools/ci_build/protobuf')
-rw-r--r--tensorflow/tools/ci_build/protobuf/protobuf_optimized_pip.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/tensorflow/tools/ci_build/protobuf/protobuf_optimized_pip.sh b/tensorflow/tools/ci_build/protobuf/protobuf_optimized_pip.sh
new file mode 100644
index 0000000000..71cbc98a25
--- /dev/null
+++ b/tensorflow/tools/ci_build/protobuf/protobuf_optimized_pip.sh
@@ -0,0 +1,32 @@
+#!/usr/bin/env bash
+# Copyright 2016 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.
+# ==============================================================================
+
+PROTOBUF_VERSION="3.1.0"
+DIR=/workspace/protobuf
+
+set -ex
+
+mkdir -p $DIR
+cd $DIR
+curl -SsL -O https://github.com/google/protobuf/archive/v${PROTOBUF_VERSION}.tar.gz
+tar xzf v${PROTOBUF_VERSION}.tar.gz
+cd $DIR/protobuf-${PROTOBUF_VERSION}
+./autogen.sh
+CXXFLAGS="-fPIC -g -O2" ./configure
+make -j8
+export PROTOC=$DIR/src/protoc
+cd python
+python setup.py bdist_wheel --cpp_implementation --compile_static_extension