Commit b6b1e0f5 authored by 's avatar

- 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.
parent 3303c923
...@@ -7,6 +7,8 @@ Change History ...@@ -7,6 +7,8 @@ Change History
1.0.2 (unreleased) 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) 1.0.1 (2008-04-02)
================== ==================
......
...@@ -897,7 +897,7 @@ def _script(module_name, attrs, path, dest, executable, arguments, ...@@ -897,7 +897,7 @@ def _script(module_name, attrs, path, dest, executable, arguments,
dest += '-script.py' dest += '-script.py'
contents = script_template % dict( contents = script_template % dict(
python = executable, python = _safe_arg(executable),
path = path, path = path,
module_name = module_name, module_name = module_name,
attrs = attrs, attrs = attrs,
...@@ -948,7 +948,7 @@ def _pyscript(path, dest, executable): ...@@ -948,7 +948,7 @@ def _pyscript(path, dest, executable):
dest += '-script.py' dest += '-script.py'
contents = py_script_template % dict( contents = py_script_template % dict(
python = executable, python = _safe_arg(executable),
path = path, path = path,
) )
changed = not (os.path.exists(dest) and open(dest).read() == contents) changed = not (os.path.exists(dest) and open(dest).read() == contents)
......
...@@ -589,7 +589,8 @@ if os.path.exists(bootstrap_py): ...@@ -589,7 +589,8 @@ if os.path.exists(bootstrap_py):
... parts = ... parts =
... ''') ... ''')
>>> write('bootstrap.py', open(bootstrap_py).read()) >>> 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 ... Downloading ...
Generated script '/sample/bin/buildout'. Generated script '/sample/bin/buildout'.
...@@ -2587,7 +2588,8 @@ def updateSetup(test): ...@@ -2587,7 +2588,8 @@ def updateSetup(test):
normalize_bang = ( 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', '#!/usr/local/bin/python2.4',
) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment