[Checkins] SVN: zope.configuration/trunk/ - Simple title in README.txt

Baiju M baiju.m.mail at gmail.com
Thu Mar 5 01:52:17 EST 2009


Log message for revision 97517:
  - Simple title in README.txt
  - Update bootstrap.py (latest from zc.buildout)
  

Changed:
  U   zope.configuration/trunk/README.txt
  U   zope.configuration/trunk/bootstrap.py

-=-
Modified: zope.configuration/trunk/README.txt
===================================================================
--- zope.configuration/trunk/README.txt	2009-03-05 05:58:36 UTC (rev 97516)
+++ zope.configuration/trunk/README.txt	2009-03-05 06:52:17 UTC (rev 97517)
@@ -1,5 +1,5 @@
-zope.configuration Package Readme
-=================================
+zope.configuration
+==================
 
 Overview
 --------

Modified: zope.configuration/trunk/bootstrap.py
===================================================================
--- zope.configuration/trunk/bootstrap.py	2009-03-05 05:58:36 UTC (rev 97516)
+++ zope.configuration/trunk/bootstrap.py	2009-03-05 06:52:17 UTC (rev 97517)
@@ -24,37 +24,46 @@
 
 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)
+is_jython = sys.platform.startswith('java')
 
-import pkg_resources
+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)
 
-is_jython = sys.platform.startswith('java')
+    import pkg_resources
 
-if is_jython:
-    import subprocess
+if sys.platform == 'win32':
+    def quote(c):
+        if ' ' in c:
+            return '"%s"' % c # work around spawn lamosity on windows
+        else:
+            return c
+else:
+    def quote (c):
+        return c
 
 cmd = 'from setuptools.command.easy_install import main; main()'
-if sys.platform == 'win32':
-    cmd = '"%s"' % cmd # work around spawn lamosity on windows
+ws  = pkg_resources.working_set
 
-ws = pkg_resources.working_set
-
 if is_jython:
-    assert subprocess.Popen(
-           [sys.executable] + ['-c', cmd, '-mqNxd', tmpeggs, 'zc.buildout'],
-           env = dict(os.environ,
-                 PYTHONPATH = 
-                 ws.find(pkg_resources.Requirement.parse('setuptools')).location
-                 ),
+    import subprocess
+    
+    assert subprocess.Popen([sys.executable] + ['-c', quote(cmd), '-mqNxd', 
+           quote(tmpeggs), 'zc.buildout'], 
+           env=dict(os.environ,
+               PYTHONPATH=
+               ws.find(pkg_resources.Requirement.parse('setuptools')).location
+               ),
            ).wait() == 0
 
 else:
     assert os.spawnle(
-        os.P_WAIT, sys.executable, sys.executable,
-        '-c', cmd, '-mqNxd', tmpeggs, 'zc.buildout',
+        os.P_WAIT, sys.executable, quote (sys.executable),
+        '-c', quote (cmd), '-mqNxd', quote (tmpeggs), 'zc.buildout',
         dict(os.environ,
             PYTHONPATH=
             ws.find(pkg_resources.Requirement.parse('setuptools')).location



More information about the Checkins mailing list