[Numpy-svn] r6062 - in branches/visualstudio_manifest/numpy/distutils: . command

numpy-svn@scip... numpy-svn@scip...
Mon Nov 17 06:07:16 CST 2008


Author: cdavid
Date: 2008-11-17 06:06:58 -0600 (Mon, 17 Nov 2008)
New Revision: 6062

Modified:
   branches/visualstudio_manifest/numpy/distutils/command/config.py
   branches/visualstudio_manifest/numpy/distutils/mingw32ccompiler.py
Log:
Generate the rc file for manifest embedding.

Modified: branches/visualstudio_manifest/numpy/distutils/command/config.py
===================================================================
--- branches/visualstudio_manifest/numpy/distutils/command/config.py	2008-11-17 12:06:26 UTC (rev 6061)
+++ branches/visualstudio_manifest/numpy/distutils/command/config.py	2008-11-17 12:06:58 UTC (rev 6062)
@@ -13,7 +13,7 @@
 from distutils.msvccompiler import get_build_version as get_build_msvc_version
 from numpy.distutils.exec_command import exec_command
 from numpy.distutils.mingw32ccompiler import msvc_manifest_xml, \
-     check_embedded_msvcr_match_linked, manifest_name
+     check_embedded_msvcr_match_linked, manifest_name, rc_name
 
 LANG_EXT['f77'] = '.f'
 LANG_EXT['f90'] = '.f90'
@@ -126,6 +126,12 @@
                     self.temp_files.append(man)
                     man.write(manxml)
                     man.close()
+                    # Write the rc file
+                    manrc = manifest_rc(manifest_name(self), "exe")
+                    rc = open(rc_name(self), "w")
+                    self.temp_files.append(rc)
+                    rc.write(manrc)
+                    rc.close()
         return self._wrap_method(old_config._link,lang,
                                  (body, headers, include_dirs,
                                   libraries, library_dirs, lang))

Modified: branches/visualstudio_manifest/numpy/distutils/mingw32ccompiler.py
===================================================================
--- branches/visualstudio_manifest/numpy/distutils/mingw32ccompiler.py	2008-11-17 12:06:26 UTC (rev 6061)
+++ branches/visualstudio_manifest/numpy/distutils/mingw32ccompiler.py	2008-11-17 12:06:58 UTC (rev 6062)
@@ -316,3 +316,8 @@
     root = configtest_name(config)
     exext = self.compiler.exe_extension
     return root + exect + ".manifest"
+
+def rc_name(config):
+    # Get configest name (including suffix)  
+    root = configtest_name(config)
+    return root + ".rc"



More information about the Numpy-svn mailing list