[Checkins] SVN: z3c.flashmessage/trunk/bootstrap.py using newer bootstrap.py

Christian Zagrodnick cz at gocept.com
Wed Sep 12 08:35:43 EDT 2007


Log message for revision 79584:
  using newer bootstrap.py

Changed:
  U   z3c.flashmessage/trunk/bootstrap.py

-=-
Modified: z3c.flashmessage/trunk/bootstrap.py
===================================================================
--- z3c.flashmessage/trunk/bootstrap.py	2007-09-12 08:10:13 UTC (rev 79583)
+++ z3c.flashmessage/trunk/bootstrap.py	2007-09-12 12:35:43 UTC (rev 79584)
@@ -17,19 +17,22 @@
 The script accepts buildout command-line options, so you can
 use the -c option to specify an alternate configuration file.
 
-$Id: bootstrap.py 72703 2007-02-20 11:49:26Z jim $
+$Id$
 """
 
 import os, shutil, sys, tempfile, urllib2
 
 tmpeggs = tempfile.mkdtemp()
 
-ez = {}
-exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
-                     ).read() in ez
-ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
+try:
+    import pkg_resources
+except ImportError:
+    ez = {}
+    exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
+                         ).read() in ez
+    ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
 
-import pkg_resources
+    import pkg_resources
 
 cmd = 'from setuptools.command.easy_install import main; main()'
 if sys.platform == 'win32':



More information about the Checkins mailing list