mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
get_export_symbols() changed, adds now module init function if not given
by the user.
This commit is contained in:
parent
1f6a0d4568
commit
a35c931eb2
1 changed files with 4 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue