aboutsummaryrefslogtreecommitdiffhomepage
path: root/python/setup.py
diff options
context:
space:
mode:
authorGravatar jieluo@google.com <jieluo@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2014-08-12 21:28:31 +0000
committerGravatar jieluo@google.com <jieluo@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2014-08-12 21:28:31 +0000
commit7580a8929f9505bd52125d523729da4b1672a493 (patch)
tree83951ed14a4f5ca695e52d8a157d6f1de26ecbff /python/setup.py
parentbde4a3254a7de58911941b0fbf38e9dd992de973 (diff)
add shared_pr.h
Diffstat (limited to 'python/setup.py')
-rwxr-xr-xpython/setup.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/python/setup.py b/python/setup.py
index 0e95adad..db3a32e9 100755
--- a/python/setup.py
+++ b/python/setup.py
@@ -8,14 +8,17 @@ import subprocess
# We must use setuptools, not distutils, because we need to use the
# namespace_packages option for the "google" package.
try:
- from ez_setup import use_setuptools
- use_setuptools()
- from setuptools import setup, Extension, __version__
+ from setuptools import setup, Extension
except ImportError:
- sys.stderr.write(
- "Could not import setuptools; make sure you have setuptools or "
- "ez_setup installed.\n")
- raise
+ try:
+ from ez_setup import use_setuptools
+ use_setuptools()
+ from setuptools import setup, Extension
+ except ImportError:
+ sys.stderr.write(
+ "Could not import setuptools; make sure you have setuptools or "
+ "ez_setup installed.\n")
+ raise
from distutils.command.clean import clean as _clean
from distutils.command.build_py import build_py as _build_py
from distutils.spawn import find_executable
@@ -118,7 +121,6 @@ class build_py(_build_py):
if __name__ == '__main__':
- print(__version__)
# C++ implementation extension
nocpp = '--nocpp_implementation'
if nocpp in sys.argv: