summaryrefslogtreecommitdiff
path: root/numpy/distutils/mingw32ccompiler.py
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2008-11-16 11:44:33 +0000
committerDavid Cournapeau <cournape@gmail.com>2008-11-16 11:44:33 +0000
commitf0465252ddecd0625c3de2034a7540e2465baeba (patch)
tree154fedea97cd34108567009df59ae86bc0fc37f6 /numpy/distutils/mingw32ccompiler.py
parentff611feb90d7bd130aa94634ba6e370f9227bf47 (diff)
downloadnumpy-f0465252ddecd0625c3de2034a7540e2465baeba.tar.gz
Add manifest_rc to generate the .rc file which will be used to embed the manifest file.
Diffstat (limited to 'numpy/distutils/mingw32ccompiler.py')
-rw-r--r--numpy/distutils/mingw32ccompiler.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/numpy/distutils/mingw32ccompiler.py b/numpy/distutils/mingw32ccompiler.py
index d0ff39653..fdb215865 100644
--- a/numpy/distutils/mingw32ccompiler.py
+++ b/numpy/distutils/mingw32ccompiler.py
@@ -272,3 +272,17 @@ def msvc_manifest_xml(maj, min):
</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)