Kaydet (Commit) f0219ba2 authored tarafından Greg Ward's avatar Greg Ward

Ditch .def file kludge for (much smaller) /export option kludge.

üst da8d216e
...@@ -236,18 +236,7 @@ class BuildExt (Command): ...@@ -236,18 +236,7 @@ class BuildExt (Command):
library_dirs = build_info.get ('library_dirs') library_dirs = build_info.get ('library_dirs')
extra_args = build_info.get ('extra_link_args') or [] extra_args = build_info.get ('extra_link_args') or []
if self.compiler.compiler_type == 'msvc': if self.compiler.compiler_type == 'msvc':
def_file = build_info.get ('def_file') extra_args.append ('/export:init%s' % extension_name)
if def_file is None:
source_dir = os.path.dirname (sources[0])
ext_base = (string.split (extension_name, '.'))[-1]
def_file = os.path.join (source_dir, "%s.def" % ext_base)
if not os.path.exists (def_file):
self.warn ("file '%s' not found: " % def_file +
"might have problems building DLL")
def_file = None
if def_file is not None:
extra_args.append ('/DEF:' + def_file)
ext_filename = self.extension_filename \ ext_filename = self.extension_filename \
(extension_name, self.package) (extension_name, self.package)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment