aboutsummaryrefslogtreecommitdiff
path: root/python/setup.py
diff options
context:
space:
mode:
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"