aboutsummaryrefslogtreecommitdiffhomepage
path: root/python/setup.py
diff options
context:
space:
mode:
authorGravatar liujisi@google.com <liujisi@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2012-12-05 01:25:12 +0000
committerGravatar liujisi@google.com <liujisi@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2012-12-05 01:25:12 +0000
commite34f1f63b6080c5966559a7a09e90eb05d15cefc (patch)
treef8eea5d6042889eb5b685aa89387a9b1b5db71cf /python/setup.py
parent8cc2017f345c5498375256973157ea1afa86409a (diff)
Find the protoc from environ first for python.
Diffstat (limited to 'python/setup.py')
-rwxr-xr-xpython/setup.py4
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"