def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir):
 try:
  import setuptools
  if (setuptools.__version__ == '0.0.1'):
   print >>sys.stderr, 'You have an obsolete version of setuptools installed.  Please\nremove it from your system entirely before rerunning this script.'
   sys.exit(2)
 except ImportError:
  egg = download_setuptools(version, download_base, to_dir)
  sys.path.insert(0, egg)
  import setuptools
  setuptools.bootstrap_install_from = egg
 import pkg_resources
 try:
  pkg_resources.require(('setuptools>=' + version))
 except pkg_resources.VersionConflict:
  print >>sys.stderr, ("The required version of setuptools (>=%s) is not available, and\ncan't be installed while this script is running. Please install\n a more recent version first." % version)
  sys.exit(2)

def use_setuptools ( version = DEFAULT_VERSION , download_base = DEFAULT_URL , to_dir = os . curdir ) : try : import setuptools if ( setuptools . __version__ == '0.0.1' ) : print >> sys . stderr , 'You have an obsolete version of setuptools installed.  Please\nremove it from your system entirely before rerunning this script.' sys . exit ( 2 ) except ImportError : egg = download_setuptools ( version , download_base , to_dir ) sys . path . insert ( 0 , egg ) import setuptools setuptools . bootstrap_install_from = egg import pkg_resources try : pkg_resources . require ( ( 'setuptools>=' + version ) ) except pkg_resources . VersionConflict : print >> sys . stderr , ( "The required version of setuptools (>=%s) is not available, and\ncan't be installed while this script is running. Please install\n a more recent version first." % version ) sys . exit ( 2 )
ensure that a setuptools version is installed .