[Checkins] SVN: zc.buildout/trunk/ - more fixes for Windows

Yvo Schubbe y.2008 at wcm-solutions.de
Fri May 2 09:21:26 EDT 2008


Log message for revision 86091:
  - more fixes for Windows
  
  This change reduces test failures on my current platform from 48 to 3.
  I hope it doesn't break zc.buildout on any other platform.

Changed:
  U   zc.buildout/trunk/CHANGES.txt
  U   zc.buildout/trunk/src/zc/buildout/easy_install.py
  U   zc.buildout/trunk/src/zc/buildout/tests.py

-=-
Modified: zc.buildout/trunk/CHANGES.txt
===================================================================
--- zc.buildout/trunk/CHANGES.txt	2008-05-02 13:18:56 UTC (rev 86090)
+++ zc.buildout/trunk/CHANGES.txt	2008-05-02 13:21:26 UTC (rev 86091)
@@ -7,6 +7,8 @@
 1.0.2 (unreleased)
 ==================
 
+- More fixes for Windows. A quoted sha-bang is now used on Windows to make the
+  .exe files work with a Python executable in 'program files'.
 
 1.0.1 (2008-04-02)
 ==================

Modified: zc.buildout/trunk/src/zc/buildout/easy_install.py
===================================================================
--- zc.buildout/trunk/src/zc/buildout/easy_install.py	2008-05-02 13:18:56 UTC (rev 86090)
+++ zc.buildout/trunk/src/zc/buildout/easy_install.py	2008-05-02 13:21:26 UTC (rev 86091)
@@ -897,7 +897,7 @@
         dest += '-script.py'
 
     contents = script_template % dict(
-        python = executable,
+        python = _safe_arg(executable),
         path = path,
         module_name = module_name,
         attrs = attrs,
@@ -948,7 +948,7 @@
         dest += '-script.py'
 
     contents = py_script_template % dict(
-        python = executable,
+        python = _safe_arg(executable),
         path = path,
         )
     changed = not (os.path.exists(dest) and open(dest).read() == contents)

Modified: zc.buildout/trunk/src/zc/buildout/tests.py
===================================================================
--- zc.buildout/trunk/src/zc/buildout/tests.py	2008-05-02 13:18:56 UTC (rev 86090)
+++ zc.buildout/trunk/src/zc/buildout/tests.py	2008-05-02 13:21:26 UTC (rev 86091)
@@ -589,7 +589,8 @@
     ... parts =
     ... ''')
     >>> write('bootstrap.py', open(bootstrap_py).read())
-    >>> print system(sys.executable+' '+'bootstrap.py'), # doctest: +ELLIPSIS
+    >>> print system(zc.buildout.easy_install._safe_arg(sys.executable)+' '+
+    ...              'bootstrap.py'), # doctest: +ELLIPSIS
     Downloading ...
     Generated script '/sample/bin/buildout'.
 
@@ -2584,10 +2585,11 @@
     os.mkdir(os.path.join(new_releases, 'zc.buildout'))
     os.mkdir(os.path.join(new_releases, 'setuptools'))
 
-    
-    
+
+
 normalize_bang = (
-    re.compile(re.escape('#!'+sys.executable)),
+    re.compile(re.escape('#!'+
+                         zc.buildout.easy_install._safe_arg(sys.executable))),
     '#!/usr/local/bin/python2.4',
     )
 



More information about the Checkins mailing list