i'm trying cythonize python modules (on windows) , want resulting .c files stored in different directory.
i tried this:
from cython.build import cythonize module_list = cythonize(r'c:\myproject\module.py', force=true, build_dir=r'c:\myproject\compiled_modules') the compilation done file module.c created in c:\myproject , not in c:\myproject\compiled_modules expected. doing wrong?
i'm not sure cythonize function can coerced doing that. use command line:
/path/to/cython yourmod.py -o compiled_modules/yourmod.c edit:
this command can called python script using subprocess module:
import subprocess subprocess.check_call(["/path/to/cython", "yourmod.py", "-o", "compiled_modules/yourmod.c"]) edit 2:
according this sage developer, relocating c/cpp files not supported cython, looks either compiling command line or using normal configuration , moving c/cpp files options.
Comments
Post a Comment