0xc0150004 error buiding Mercurial under Py26/Win
Garth Roxburgh-Kidd
garth at deadlybloodyserious.com
Thu May 28 06:12:51 CDT 2009
G'day!
I ran into trouble building Mercurial's tip under Python 2.6.2 on
Windows XP: an 0xc0150004 error during 'python setup.py'.
It turned out the root cause was a change in Python 2.6 for Windows,
well documented in a Python bug report: http://bugs.python.org/issue3440
Yours,
Garth.
# HG changeset patch
# User garth at deadlybloodyserious.com
# Date 1243508812 -36000
# Node ID c4327e9ecd02b8619839719e01fc315324be8d2d
# Parent c2ef478b2efad5696cd786297af84e39b02c3af6
Fixed 0xc0150004 error buiding Mercurial under Python 2.6 for Windows.
diff -r c2ef478b2efa -r c4327e9ecd02 setup.py
--- a/setup.py Wed May 27 14:44:55 2009 -0500
+++ b/setup.py Thu May 28 21:06:52 2009 +1000
@@ -107,6 +107,11 @@
env = {'PYTHONPATH': os.pathsep.join(pypath),
'HGRCPATH': '',
'LANGUAGE': 'C'}
+ if os.environ.has_key('SystemRoot'):
+ # 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,
More information about the Mercurial-devel
mailing list