builder.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:poet 作者: sdispater 项目源码 文件源码
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
        }
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号