【发布时间】:2015-12-17 21:52:26
【问题描述】:
似乎默认情况下,从 distutils.core 设置的 cmdclass 设置为 build_ext,在当前工作目录中编译 cpp 或 c 文件。有没有办法确定生成的 c 代码的写入位置?否则,存储库中会堆满生成的代码。
例如这个文件 setup.py 会写一个文件 example.c 到当前工作目录:
from distutils.core import setup
from Cython.Build import cythonize
setup(
ext_modules = cythonize("example.pyx"))
【问题讨论】: