diff options
Diffstat (limited to 'python')
-rwxr-xr-x | python/ez_setup.py | 1 | ||||
-rwxr-xr-x | python/setup.py | 18 |
2 files changed, 10 insertions, 9 deletions
diff --git a/python/ez_setup.py b/python/ez_setup.py index 71177b00..3aec98e4 100755 --- a/python/ez_setup.py +++ b/python/ez_setup.py @@ -103,7 +103,6 @@ def use_setuptools( sys.path.insert(0, egg) import setuptools; setuptools.bootstrap_install_from = egg try: - return do_download() import pkg_resources except ImportError: return do_download() 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: |