setup.py 文件源码

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

项目:Python-Wrapper-for-World-Vocoder 作者: JeremyCCHsu 项目源码 文件源码
def finalize_options(self):
        _build_ext.finalize_options(self)
        # Prevent numpy from thinking it is still in its setup process:
        __builtins__.__NUMPY_SETUP__ = False
        import numpy
        self.include_dirs.append(numpy.get_include())

# # This can be loosen probably, though it's fine I think
# min_cython_ver = '0.24.0'
# try:
#     import Cython
#     ver = Cython.__version__
#     _CYTHON_INSTALLED = ver >= LooseVersion(min_cython_ver)
# except ImportError:
#     _CYTHON_INSTALLED = False

# try:
#     if not _CYTHON_INSTALLED:
#         raise ImportError('No supported version of Cython installed.')
#     from Cython.Distutils import build_ext
#     cython = True
# except ImportError:
#     cython = False

# if cython:
#     ext = '.pyx'
#     cmdclass = {'build_ext': build_ext}
# else:
#     ext = '.cpp'
#     cmdclass = {}
#     if not os.path.exists(join("pyworld", "pyworld" + ext)):
#         raise RuntimeError("Cython is required to generate C++ wrapper")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号