[Numpy-svn] r6047 - branches/visualstudio_manifest/numpy/distutils

numpy-svn at scipy.org numpy-svn at scipy.org
Sun Nov 16 06:44:45 EST 2008


Author: cdavid
Date: 2008-11-16 05:44:33 -0600 (Sun, 16 Nov 2008)
New Revision: 6047

Modified:
   branches/visualstudio_manifest/numpy/distutils/mingw32ccompiler.py
Log:
Add manifest_rc to generate the .rc file which will be used to embed the manifest file.

Modified: branches/visualstudio_manifest/numpy/distutils/mingw32ccompiler.py
===================================================================
--- branches/visualstudio_manifest/numpy/distutils/mingw32ccompiler.py	2008-11-16 11:44:18 UTC (rev 6046)
+++ branches/visualstudio_manifest/numpy/distutils/mingw32ccompiler.py	2008-11-16 11:44:33 UTC (rev 6047)
@@ -272,3 +272,17 @@
 </assembly>"""
 
     return template % {'fullver': fullver, 'maj': maj, 'min': min}
+
+def manifest_rc(biname, type='dll'):
+    """Return the rc file used to generate the res file which will be embedded
+    as manifest for binary biname, of given type ('dll' or 'exe')."""
+    if type == 'dll':
+        rctype = 2
+    elif type == 'exe':
+        rctype = 1
+    else:
+        raise ValueError("Type %s not supported" % type)
+
+    return """\
+#include "winuser.h"
+%d RT_MANIFEST %s.manifest""" % (rctype, biname)




More information about the Numpy-svn mailing list