Commit e4f4d9fe authored by Tamir Duberstein's avatar Tamir Duberstein

Only generate protos in development

Fixes #333.
parent c91d9ab0
...@@ -87,6 +87,10 @@ def generate_proto(source): ...@@ -87,6 +87,10 @@ def generate_proto(source):
def GenerateUnittestProtos(): def GenerateUnittestProtos():
# Unittest protos are only needed for development.
if not os.path.exists("../.git"):
return
generate_proto("../src/google/protobuf/unittest.proto") generate_proto("../src/google/protobuf/unittest.proto")
generate_proto("../src/google/protobuf/unittest_custom_options.proto") generate_proto("../src/google/protobuf/unittest_custom_options.proto")
generate_proto("../src/google/protobuf/unittest_import.proto") generate_proto("../src/google/protobuf/unittest_import.proto")
......
...@@ -95,6 +95,8 @@ build_python() { ...@@ -95,6 +95,8 @@ build_python() {
cd python cd python
python setup.py build python setup.py build
python setup.py test python setup.py test
python setup.py sdist
sudo pip install virtualenv && virtualenv /tmp/protoenv && /tmp/protoenv/bin/pip install dist/*
cd .. cd ..
} }
...@@ -107,6 +109,8 @@ build_python_cpp() { ...@@ -107,6 +109,8 @@ build_python_cpp() {
cd python cd python
python setup.py build --cpp_implementation python setup.py build --cpp_implementation
python setup.py test --cpp_implementation python setup.py test --cpp_implementation
python setup.py sdist --cpp_implementation
sudo pip install virtualenv && virtualenv /tmp/protoenv && /tmp/protoenv/bin/pip install dist/*
cd .. cd ..
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment