diff options
author | Greg Ward <gward@python.net> | 2000-08-13 00:42:35 (GMT) |
---|---|---|
committer | Greg Ward <gward@python.net> | 2000-08-13 00:42:35 (GMT) |
commit | a35c931eb2349423ed5f986f699d7ec22924101d (patch) | |
tree | aca5931e484bf44ff218a2bcc8316cd7993cc569 | |
parent | 1f6a0d456888f97b20bd1252f01905168a0a6c98 (diff) | |
download | cpython-a35c931eb2349423ed5f986f699d7ec22924101d.zip cpython-a35c931eb2349423ed5f986f699d7ec22924101d.tar.gz cpython-a35c931eb2349423ed5f986f699d7ec22924101d.tar.bz2 |
get_export_symbols() changed, adds now module init function if not given
by the user.
-rw-r--r-- | Lib/distutils/command/build_ext.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py index 1ffe323..aca6dac 100644 --- a/Lib/distutils/command/build_ext.py +++ b/Lib/distutils/command/build_ext.py @@ -549,14 +549,10 @@ class build_ext (Command): the .pyd file (DLL) must export the module "init" function. """ - # XXX what if 'export_symbols' defined but it doesn't contain - # "init" + module_name? Should we add it? warn? or just carry - # on doing nothing? - - if ext.export_symbols is None: - return ["init" + string.split(ext.name,'.')[-1]] - else: - return ext.export_symbols + initfunc_name = "init" + string.split(ext.name,'.')[-1] + if initfunc_name not in ext.export_symbols: + ext.export_symbols.append(initfunc_name) + return ext.export_symbols def get_libraries (self, ext): """Return the list of libraries to link against when building a |