forked from vitessio/vitess
-
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.
Fixing the scripts to build grpc and protobuf better.
Docker and travis: build and install as root in /
- Loading branch information
1 parent
8e86c4f
commit 9e3caff
Showing
5 changed files
with
88 additions
and
39 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
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,30 @@ | ||
#!/bin/bash | ||
|
||
# This script downloads and installs the grpc library, for | ||
# go and python, in the root of the image. It assumes we're running | ||
# as root in the image. | ||
set -ex | ||
|
||
# grpc_dist can be empty, in which case we just install to the default paths | ||
grpc_dist="$1" | ||
if [ "$grpc_dist" != "" ]; then | ||
cd $grpc_dist | ||
fi | ||
|
||
git clone https://github.com/grpc/grpc.git | ||
cd grpc | ||
git submodule update --init | ||
make | ||
if [ "$grpc_dist" != "" ]; then | ||
make install prefix=$grpc_dist | ||
else | ||
make install | ||
fi | ||
./tools/run_tests/build_python.sh | ||
if [ "$grpc_dist" != "" ]; then | ||
pip install -r src/python/requirements.txt -t $grpc_dist/lib/python2.7/site-packages | ||
CFLAGS=-I$grpc_dist/include LDFLAGS=-L$grpc_dist/lib pip install src/python/src | ||
else | ||
pip install -r src/python/requirements.txt | ||
pip install src/python/src | ||
fi |
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,31 @@ | ||
#!/bin/bash | ||
|
||
# This script downloads and installs the protobuf library, for | ||
# go and python, in the root of the image. It assumes we're running | ||
# as root in the image. | ||
set -ex | ||
|
||
# protobuf_dist can be empty, in which case we just install to the default paths | ||
protobuf_dist="$1" | ||
if [ "$protobuf_dist" != "" ]; then | ||
cd $protobuf_dist | ||
fi | ||
|
||
wget https://github.com/google/protobuf/archive/v3.0.0-alpha-1.tar.gz | ||
tar -xvzf v3.0.0-alpha-1.tar.gz | ||
cd protobuf-3.0.0-alpha-1 | ||
./autogen.sh | ||
if [ "$protobuf_dist" != "" ]; then | ||
./configure --prefix=$protobuf_dist | ||
else | ||
./configure | ||
fi | ||
make | ||
make install | ||
cd python | ||
python setup.py build --cpp_implementation | ||
if [ "$protobuf_dist" != "" ]; then | ||
python setup.py install --cpp_implementation --prefix=$protobuf_dist | ||
else | ||
python setup.py install --cpp_implementation | ||
fi |