aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamir Duberstein <tamird@gmail.com>2015-05-07 07:40:38 -0400
committerTamir Duberstein <tamird@gmail.com>2015-05-15 17:53:00 -0400
commite4f4d9fe83887b08b0db67512947645324826755 (patch)
tree3ab03c5d88871728cb48c5326c2ccd0fd49ad609
parentc91d9ab0fd346288b31914419cffaafc558fced3 (diff)
downloadprotobuf-e4f4d9fe83887b08b0db67512947645324826755.tar.gz
protobuf-e4f4d9fe83887b08b0db67512947645324826755.tar.bz2
protobuf-e4f4d9fe83887b08b0db67512947645324826755.zip
Only generate protos in development
Fixes #333.
-rwxr-xr-xpython/setup.py4
-rwxr-xr-xtravis.sh4
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")
diff --git a/travis.sh b/travis.sh
index a7dbc840..24e0a4e0 100755
--- a/travis.sh
+++ b/travis.sh
@@ -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 ..
}