[Checkins] SVN: zc.buildout/branches/gary-support-system-python/ bootstrap for Windows

Gary Poster gary.poster at canonical.com
Mon Jul 13 09:45:11 EDT 2009


Log message for revision 101848:
  bootstrap for Windows

Changed:
  U   zc.buildout/branches/gary-support-system-python/bootstrap/bootstrap.py
  U   zc.buildout/branches/gary-support-system-python/src/zc/buildout/easy_install.py

-=-
Modified: zc.buildout/branches/gary-support-system-python/bootstrap/bootstrap.py
===================================================================
--- zc.buildout/branches/gary-support-system-python/bootstrap/bootstrap.py	2009-07-13 13:22:45 UTC (rev 101847)
+++ zc.buildout/branches/gary-support-system-python/bootstrap/bootstrap.py	2009-07-13 13:45:10 UTC (rev 101848)
@@ -139,16 +139,17 @@
     os.environ,
     PYTHONPATH=ws.find(pkg_resources.Requirement.parse('setuptools')).location)
 
-try:
+is_jython = sys.platform.startswith('java')
+if is_jython:
     import subprocess
-except ImportError:
+    exitcode = subprocess.Popen(cmd, env=env).wait()
+else: # Windows needs this, apparently; otherwise we would prefer subprocess
     exitcode = os.spawnle(*([os.P_WAIT, sys.executable] + cmd + [env]))
-else:
-    # Jython can use subprocess but not spawn.  We prefer it generally.
-    exitcode = subprocess.Popen(cmd, env=env).wait()
 if exitcode != 0:
-    # we shouldn't need an error message because a failure
-    # should have generated a visible traceback in the subprocess.
+    sys.flush()
+    print ("An error occured when trying to install zc.buildout. "
+           "Look above this message for any errors that "
+           "were output by easy_install.")
     sys.exit(exitcode)
 
 ws.add_entry(configuration['--eggs'])

Modified: zc.buildout/branches/gary-support-system-python/src/zc/buildout/easy_install.py
===================================================================
--- zc.buildout/branches/gary-support-system-python/src/zc/buildout/easy_install.py	2009-07-13 13:22:45 UTC (rev 101847)
+++ zc.buildout/branches/gary-support-system-python/src/zc/buildout/easy_install.py	2009-07-13 13:45:10 UTC (rev 101848)
@@ -419,8 +419,8 @@
 
             if exit_code:
                 logger.error(
-                    "An error occured when trying to install %s."
-                    "Look above this message for any errors that"
+                    "An error occured when trying to install %s. "
+                    "Look above this message for any errors that "
                     "were output by easy_install.",
                     dist)
 



More information about the Checkins mailing list