setup.py
changeset 8648 ca443bac7ed4
parent 8629 8e69a22f6792
child 8936 1de6e7e1bb9f
--- a/setup.py	Thu May 28 08:29:40 2009 +0200
+++ b/setup.py	Thu May 28 17:03:35 2009 +0200
@@ -107,6 +107,11 @@
     env = {'PYTHONPATH': os.pathsep.join(pypath),
            'HGRCPATH': '',
            'LANGUAGE': 'C'}
+    if 'SystemRoot' in os.environ:
+        # Copy SystemRoot into the custom environment for Python 2.6
+        # under Windows. Otherwise, the subprocess will fail with
+        # error 0xc0150004. See: http://bugs.python.org/issue3440
+        env['SystemRoot'] = os.environ['SystemRoot']
     cmd = [sys.executable, 'hg', 'id', '-i', '-t']
 
     p = subprocess.Popen(cmd, stdout=subprocess.PIPE,