[Checkins] SVN: projectsupport/trunk/src/workspace/develop.py Only download and bootstrap if setuptools is not already available.

Nathan Yergler nathan at yergler.net
Mon May 22 10:39:59 EDT 2006


Log message for revision 68240:
  Only download and bootstrap if setuptools is not already available.

Changed:
  U   projectsupport/trunk/src/workspace/develop.py

-=-
Modified: projectsupport/trunk/src/workspace/develop.py
===================================================================
--- projectsupport/trunk/src/workspace/develop.py	2006-05-22 14:19:03 UTC (rev 68239)
+++ projectsupport/trunk/src/workspace/develop.py	2006-05-22 14:39:55 UTC (rev 68240)
@@ -49,7 +49,7 @@
                                + ":" + libdir)
     ez_setup.main(['--install-dir', libdir,
                    '--script-dir', bindir,
-                   '-U', 'setuptools'])
+                   'setuptools'])
 
 def initSetupCfg(setup_file, template_file='setup.cfg.in'):
     """Check if the setup_file (setup.cfg) exists; if it doesn't, and
@@ -164,8 +164,12 @@
     check_dirs(options.bindir, options.libdir)
     sys.path.insert(0, options.libdir)
 
-    # bootstrap setuptools into our libdir
-    bootstrap(options.libdir, options.bindir)
+    # see if we need to bootstrap setuptools
+    try:
+        import setuptools
+    except ImportError, e:
+        # setuptools not available -- bootstrap into our libdir
+        bootstrap(options.libdir, options.bindir)
 
     # install the development dependencies
     from setuptools.command.easy_install import main as einstall



More information about the Checkins mailing list