def _ext_modules(self, poet):
"""
Builds the extension modules.
Transforms the extensions section:
[extensions]
"my.module" = "my/module.c"
to a proper extension:
Extension('my.module', 'my/module.c')
:param poet: The Poet instance for which to build.
:type poet: poet.poet.Poet
:rtype: dict
"""
extensions = []
for module, source in poet.extensions.items():
if not isinstance(source, list):
source = [source]
extensions.append(Extension(module, source))
return {
'ext_modules': extensions
}
评论列表
文章目录