Permalink
Browse files

Dont try to compile proto if it doesnt exist

  • Loading branch information...
1 parent 1b89527 commit 435b1463c144d8e785408f5dc6c91ab295b110df @dcramer committed Jul 19, 2011
Showing with 8 additions and 2 deletions.
  1. +8 −2 setup.py
View
@@ -109,8 +109,10 @@ def MakeTestSuite():
else:
# Generate necessary .proto file if it doesn't exist.
# TODO(kenton): Maybe we should hook this into a distutils command?
- generate_proto(os.path.join(root, 'src', 'google', 'protobuf', 'descriptor.proto'))
- generate_proto(os.path.join(root, 'src', 'google', 'protobuf', 'compiler', 'plugin.proto'))
+ for path in [os.path.join(root, 'src', 'google', 'protobuf', 'descriptor.proto'),
+ os.path.join(root, 'src', 'google', 'protobuf', 'compiler', 'plugin.proto')]:
+ if os.path.exists(path):
+ generate_proto(path)
ext_module_list = []
@@ -129,6 +131,10 @@ def MakeTestSuite():
version = '2.4.1',
package_dir = { 'google': 'python/google' },
packages = find_packages('python'),
+ package_data = {
+ '': ['*.cc', '*.h', '*.proto'],
+ 'google.protobuf': ['pyext/*'],
+ },
namespace_packages = [ 'google' ],
test_suite = 'setup.MakeTestSuite',
ext_modules = ext_module_list,

0 comments on commit 435b146

Please sign in to comment.