diff options
author | Tamir Duberstein <tamird@gmail.com> | 2015-05-07 07:40:38 -0400 |
---|---|---|
committer | Tamir Duberstein <tamird@gmail.com> | 2015-05-15 17:53:00 -0400 |
commit | e4f4d9fe83887b08b0db67512947645324826755 (patch) | |
tree | 3ab03c5d88871728cb48c5326c2ccd0fd49ad609 | |
parent | c91d9ab0fd346288b31914419cffaafc558fced3 (diff) | |
download | protobuf-e4f4d9fe83887b08b0db67512947645324826755.tar.gz protobuf-e4f4d9fe83887b08b0db67512947645324826755.tar.bz2 protobuf-e4f4d9fe83887b08b0db67512947645324826755.zip |
Only generate protos in development
Fixes #333.
-rwxr-xr-x | python/setup.py | 4 | ||||
-rwxr-xr-x | travis.sh | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/python/setup.py b/python/setup.py index 228b00b3..a1365fba 100755 --- a/python/setup.py +++ b/python/setup.py @@ -87,6 +87,10 @@ def generate_proto(source): 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_custom_options.proto") generate_proto("../src/google/protobuf/unittest_import.proto") @@ -95,6 +95,8 @@ build_python() { cd python python setup.py build python setup.py test + python setup.py sdist + sudo pip install virtualenv && virtualenv /tmp/protoenv && /tmp/protoenv/bin/pip install dist/* cd .. } @@ -107,6 +109,8 @@ build_python_cpp() { cd python python setup.py build --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 .. } |