Commits

Anonymous committed 1c09c81

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

Comments (0)

Files changed (1)

distribute_setup.py

 
 
 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 \
         try:
             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)