Hello! I'm a developer on Chromium OS, and we recently (today) started needing to build the protocol buffers with python support enabled in our cross-compilation environment. Passing --with-protoc to ./configure got me partway there, but then when it tried to run "python setup.py build", it got intro trouble. Turns out there's logic in setup.py to go looking for the protoc that was just compiled. In a cross-compile situation, that won't work :-/ I've got a patch to allow the desired protoc to be overridden by an environment variable:
diff -Naur protobuf-2.3.0-orig/python/setup.py protobuf-2.3.0/python/setup.py --- protobuf-2.3.0-orig/python/setup.py 2011-03-22 16:33:33.000000000 -0700 +++ protobuf-2.3.0/python/setup.py 2011-03-22 17:01:14.000000000 -0700 @@ -16,7 +16,9 @@ maintainer_email = "[email protected]" # Find the Protocol Compiler. -if os.path.exists("../src/protoc"): +if 'PROTOC' in os.environ and os.path.exists(os.environ['PROTOC']): + protoc = os.environ['PROTOC'] +elif os.path.exists("../src/protoc"): protoc = "../src/protoc" elif os.path.exists("../src/protoc.exe"): protoc = "../src/protoc.exe" Is such an approach acceptable? How would I go about getting this patch committed? Thanks! -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
