Commit 7580a892 authored by jieluo@google.com's avatar jieluo@google.com

add shared_pr.h

parent bde4a325
...@@ -103,7 +103,6 @@ def use_setuptools( ...@@ -103,7 +103,6 @@ def use_setuptools(
sys.path.insert(0, egg) sys.path.insert(0, egg)
import setuptools; setuptools.bootstrap_install_from = egg import setuptools; setuptools.bootstrap_install_from = egg
try: try:
return do_download()
import pkg_resources import pkg_resources
except ImportError: except ImportError:
return do_download() return do_download()
......
...@@ -8,14 +8,17 @@ import subprocess ...@@ -8,14 +8,17 @@ import subprocess
# We must use setuptools, not distutils, because we need to use the # We must use setuptools, not distutils, because we need to use the
# namespace_packages option for the "google" package. # namespace_packages option for the "google" package.
try: try:
from ez_setup import use_setuptools from setuptools import setup, Extension
use_setuptools()
from setuptools import setup, Extension, __version__
except ImportError: except ImportError:
sys.stderr.write( try:
"Could not import setuptools; make sure you have setuptools or " from ez_setup import use_setuptools
"ez_setup installed.\n") use_setuptools()
raise 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.clean import clean as _clean
from distutils.command.build_py import build_py as _build_py from distutils.command.build_py import build_py as _build_py
from distutils.spawn import find_executable from distutils.spawn import find_executable
...@@ -118,7 +121,6 @@ class build_py(_build_py): ...@@ -118,7 +121,6 @@ class build_py(_build_py):
if __name__ == '__main__': if __name__ == '__main__':
print(__version__)
# C++ implementation extension # C++ implementation extension
nocpp = '--nocpp_implementation' nocpp = '--nocpp_implementation'
if nocpp in sys.argv: if nocpp in sys.argv:
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment