diff options
author | liujisi@google.com <liujisi@google.com@630680e5-0e50-0410-840e-4b1c322b438d> | 2012-12-05 01:25:12 +0000 |
---|---|---|
committer | liujisi@google.com <liujisi@google.com@630680e5-0e50-0410-840e-4b1c322b438d> | 2012-12-05 01:25:12 +0000 |
commit | e34f1f63b6080c5966559a7a09e90eb05d15cefc (patch) | |
tree | f8eea5d6042889eb5b685aa89387a9b1b5db71cf /python | |
parent | 8cc2017f345c5498375256973157ea1afa86409a (diff) | |
download | protobuf-e34f1f63b6080c5966559a7a09e90eb05d15cefc.tar.gz protobuf-e34f1f63b6080c5966559a7a09e90eb05d15cefc.tar.bz2 protobuf-e34f1f63b6080c5966559a7a09e90eb05d15cefc.zip |
Find the protoc from environ first for python.
Diffstat (limited to 'python')
-rwxr-xr-x | python/setup.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/python/setup.py b/python/setup.py index 059a98bf..2bf0048b 100755 --- a/python/setup.py +++ b/python/setup.py @@ -26,7 +26,9 @@ from distutils.spawn import find_executable maintainer_email = "protobuf@googlegroups.com" # 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" |