--- msvc9compiler.py.org 2008-10-21 19:49:59.406250000 +0200 +++ msvc9compiler.py 2008-10-21 19:43:12.031250000 +0200 @@ -644,6 +644,19 @@ mfid = 1 if target_desc == CCompiler.EXECUTABLE else 2 out_arg = '-outputresource:%s;%s' % (output_filename, mfid) try: + # remove references to VC90 runtime, so they will fall through + # to the VC90 dependency of Python.exe. This way, when + # installed for a restricted user (e.g. runtimes are not in + # WinSxS folder, but in Pythons own folder), the runtimes + # do not need to be in every folder with .pyd's + manifest_f = open(temp_manifest, "rb") + manifest_buf = manifest_f.read() + manifest_f.close() + manifest_buf = manifest_buf.replace("""""", "") + manifest_buf = manifest_buf.replace("""""", "") + manifest_f = open(temp_manifest, "wb") + manifest_f.write(manifest_buf) + manifest_f.close() self.spawn(['mt.exe', '-nologo', '-manifest', temp_manifest, out_arg]) except DistutilsExecError as msg: