[Checkins] SVN: zc.buildout/branches/help-api/ applied various patches for Windows issue
Godefroid Chapelle
gotcha at bubblenet.be
Sun Mar 29 17:17:50 EDT 2009
Log message for revision 98474:
applied various patches for Windows issue
Changed:
U zc.buildout/branches/help-api/CHANGES.txt
U zc.buildout/branches/help-api/bootstrap/bootstrap.py
U zc.buildout/branches/help-api/src/zc/buildout/buildout.py
U zc.buildout/branches/help-api/src/zc/buildout/easy_install.py
U zc.buildout/branches/help-api/src/zc/buildout/testing.py
U zc.buildout/branches/help-api/src/zc/buildout/tests.py
-=-
Modified: zc.buildout/branches/help-api/CHANGES.txt
===================================================================
--- zc.buildout/branches/help-api/CHANGES.txt 2009-03-29 21:17:43 UTC (rev 98473)
+++ zc.buildout/branches/help-api/CHANGES.txt 2009-03-29 21:17:50 UTC (rev 98474)
@@ -10,6 +10,8 @@
- Made easy_install.py's _get_version except non final releases of Python,
like 2.4.4c0. (hannosch)
+- various patches for Windows (patch by Gottfried Ganssauge) (ajung)
+
- applied patch fixing rmtree issues on Windows (patch by
Gottfried Ganssauge) (ajung)
Modified: zc.buildout/branches/help-api/bootstrap/bootstrap.py
===================================================================
--- zc.buildout/branches/help-api/bootstrap/bootstrap.py 2009-03-29 21:17:43 UTC (rev 98473)
+++ zc.buildout/branches/help-api/bootstrap/bootstrap.py 2009-03-29 21:17:50 UTC (rev 98474)
@@ -34,14 +34,21 @@
import pkg_resources
-cmd = 'from setuptools.command.easy_install import main; main()'
if sys.platform == 'win32':
- cmd = '"%s"' % cmd # work around spawn lamosity on windows
+ def quote(c):
+ if ' ' in c:
+ return '"%s"' % c # work around spawn lamosity on windows
+ else:
+ return c
+else:
+ def quote (c):
+ return c
-ws = pkg_resources.working_set
+cmd = 'from setuptools.command.easy_install import main; main()'
+ws = pkg_resources.working_set
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
Modified: zc.buildout/branches/help-api/src/zc/buildout/buildout.py
===================================================================
--- zc.buildout/branches/help-api/src/zc/buildout/buildout.py 2009-03-29 21:17:43 UTC (rev 98473)
+++ zc.buildout/branches/help-api/src/zc/buildout/buildout.py 2009-03-29 21:17:50 UTC (rev 98474)
@@ -689,7 +689,7 @@
args.insert(1, '-W')
if not __debug__:
args.insert(0, '-O')
- args.insert(0, sys.executable)
+ args.insert(0, zc.buildout.easy_install._safe_arg (sys.executable))
os.execv(sys.executable, args)
self._logger.info("Upgraded:\n %s;\nrestarting.",
@@ -712,7 +712,7 @@
args = map(zc.buildout.easy_install._safe_arg, sys.argv)
if not __debug__:
args.insert(0, '-O')
- args.insert(0, sys.executable)
+ args.insert(0, zc.buildout.easy_install._safe_arg (sys.executable))
sys.exit(os.spawnv(os.P_WAIT, sys.executable, args))
def _load_extensions(self):
@@ -764,7 +764,7 @@
setup=setup,
__file__ = setup,
))
- os.spawnl(os.P_WAIT, sys.executable, sys.executable, tsetup,
+ os.spawnl(os.P_WAIT, sys.executable, zc.buildout.easy_install._safe_arg (sys.executable), tsetup,
*[zc.buildout.easy_install._safe_arg(a)
for a in args])
finally:
Modified: zc.buildout/branches/help-api/src/zc/buildout/easy_install.py
===================================================================
--- zc.buildout/branches/help-api/src/zc/buildout/easy_install.py 2009-03-29 21:17:43 UTC (rev 98473)
+++ zc.buildout/branches/help-api/src/zc/buildout/easy_install.py 2009-03-29 21:17:50 UTC (rev 98474)
@@ -281,7 +281,7 @@
args += (dict(os.environ, PYTHONPATH=path), )
sys.stdout.flush() # We want any pending output first
exit_code = os.spawnle(
- os.P_WAIT, self._executable, self._executable,
+ os.P_WAIT, self._executable, _safe_arg (self._executable),
*args)
dists = []
@@ -823,7 +823,7 @@
if log_level < logging.DEBUG:
logger.debug("in: %r\n%s", directory, ' '.join(args))
- assert os.spawnl(os.P_WAIT, executable, executable, *args) == 0
+ assert os.spawnl(os.P_WAIT, executable, _safe_arg (executable), *args) == 0
return _copyeggs(tmp3, dest, '.egg-link', undo)
Modified: zc.buildout/branches/help-api/src/zc/buildout/testing.py
===================================================================
--- zc.buildout/branches/help-api/src/zc/buildout/testing.py 2009-03-29 21:17:43 UTC (rev 98473)
+++ zc.buildout/branches/help-api/src/zc/buildout/testing.py 2009-03-29 21:17:50 UTC (rev 98474)
@@ -102,7 +102,7 @@
here = os.getcwd()
try:
os.chdir(d)
- os.spawnle(os.P_WAIT, executable, executable, setup, *args)
+ os.spawnle(os.P_WAIT, executable, zc.buildout.easy_install._safe_arg (executable), setup, *args)
if os.path.exists('build'):
rmtree('build')
finally:
Modified: zc.buildout/branches/help-api/src/zc/buildout/tests.py
===================================================================
--- zc.buildout/branches/help-api/src/zc/buildout/tests.py 2009-03-29 21:17:43 UTC (rev 98473)
+++ zc.buildout/branches/help-api/src/zc/buildout/tests.py 2009-03-29 21:17:50 UTC (rev 98474)
@@ -2966,7 +2966,7 @@
here = os.getcwd()
os.chdir(os.path.dirname(dist.location))
assert os.spawnle(
- os.P_WAIT, sys.executable, sys.executable,
+ os.P_WAIT, sys.executable, zc.buildout.easy_install._safe_arg (sys.executable),
os.path.join(os.path.dirname(dist.location), 'setup.py'),
'-q', 'bdist_egg', '-d', eggs,
dict(os.environ,
More information about the Checkins
mailing list