setup.py 文件源码

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

项目:coordinates 作者: markovmodel 项目源码 文件源码
def get_cmdclass():
    versioneer_cmds = versioneer.get_cmdclass()

    sdist_class = versioneer_cmds['sdist']
    class sdist(sdist_class):
        """ensure cython files are compiled to c, when distributing"""

        def run(self):
            # only run if .git is present
            if not os.path.exists('.git'):
                print("Not on git, can not create source distribution")
                return

            try:
                from Cython.Build import cythonize
                print("cythonizing sources")
                cythonize(extensions())
            except ImportError:
                warnings.warn('sdist cythonize failed')
            return sdist_class.run(self)

    versioneer_cmds['sdist'] = sdist

    return versioneer_cmds
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号