Skip to content

Commit

Permalink
Only generate protos in development
Browse files Browse the repository at this point in the history
  • Loading branch information
tamird committed May 15, 2015
1 parent c91d9ab commit e4f4d9f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
4 changes: 4 additions & 0 deletions travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ..
}

Expand All @@ -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 ..
}

Expand Down

0 comments on commit e4f4d9f

Please sign in to comment.