Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3a6c367

Browse files
committed
Generate the rc file for manifest embedding.
1 parent e81458d commit 3a6c367

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

numpy/distutils/command/config.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from distutils.msvccompiler import get_build_version as get_build_msvc_version
1414
from numpy.distutils.exec_command import exec_command
1515
from numpy.distutils.mingw32ccompiler import msvc_manifest_xml, \
16-
check_embedded_msvcr_match_linked, manifest_name
16+
check_embedded_msvcr_match_linked, manifest_name, rc_name
1717

1818
LANG_EXT['f77'] = '.f'
1919
LANG_EXT['f90'] = '.f90'
@@ -126,6 +126,12 @@ def _link (self, body,
126126
self.temp_files.append(man)
127127
man.write(manxml)
128128
man.close()
129+
# Write the rc file
130+
manrc = manifest_rc(manifest_name(self), "exe")
131+
rc = open(rc_name(self), "w")
132+
self.temp_files.append(rc)
133+
rc.write(manrc)
134+
rc.close()
129135
return self._wrap_method(old_config._link,lang,
130136
(body, headers, include_dirs,
131137
libraries, library_dirs, lang))

numpy/distutils/mingw32ccompiler.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,3 +316,8 @@ def manifest_name(config):
316316
root = configtest_name(config)
317317
exext = self.compiler.exe_extension
318318
return root + exect + ".manifest"
319+
320+
def rc_name(config):
321+
# Get configest name (including suffix)
322+
root = configtest_name(config)
323+
return root + ".rc"

0 commit comments

Comments
 (0)