1. Zooko O'Whielacronx
  2. distribute


tarek  committed 1c09c81

added a new option to drive the fakery when use_setuptools is called

  • Participants
  • Parent commits 1e52f1f
  • Branches 0.6-maintenance

Comments (0)

Files changed (1)

File distribute_setup.py

View file
 def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
-                   to_dir=os.curdir, download_delay=15):
+                   to_dir=os.curdir, download_delay=15, no_fake=False):
     # making sure we use the absolute path
     to_dir = os.path.abspath(to_dir)
     was_imported = 'pkg_resources' in sys.modules or \
             import pkg_resources
             if not hasattr(pkg_resources, '_distribute'):
-                fake_setuptools()
+                if not no_fake:
+                    fake_setuptools()
                 raise ImportError
         except ImportError:
             return _do_download(version, download_base, to_dir, download_delay)