[Checkins] SVN: z3c.reference/branches/flash/bootstrap.py updated bootstrap

Bernd Dorn bernd.dorn at lovelysystems.com
Fri Sep 7 02:08:23 EDT 2007


Log message for revision 79513:
  updated bootstrap

Changed:
  U   z3c.reference/branches/flash/bootstrap.py

-=-
Modified: z3c.reference/branches/flash/bootstrap.py
===================================================================
--- z3c.reference/branches/flash/bootstrap.py	2007-09-07 05:49:38 UTC (rev 79512)
+++ z3c.reference/branches/flash/bootstrap.py	2007-09-07 06:08:23 UTC (rev 79513)
@@ -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$
+$Id: bootstrap.py 43925 2007-06-08 13:15:33Z kartnaller $
 """
 
 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':
@@ -50,3 +53,4 @@
 import zc.buildout.buildout
 zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap'])
 shutil.rmtree(tmpeggs)
+



More information about the Checkins mailing list