I'm using:
from distutils.core import setup
from Cython.Build import cythonize
setup(ext_modules = cythonize("myfile.pyx"))
to compile myfile.pyx
. Is there a way to:
.pyd
in the current folder (instead of build/
subfolder)build/
subfolder, delete the .c
file)without having to do it myself with os.remove(...)
?
To compile the example. pyx file, select Tools | Run setup.py Task command from the main menu. In the Enter setup.py task name type build and select the build_ext task. See Create and run setup.py for more details.
Unlike most Python software, Cython requires a C compiler to be present on the system. The details of getting a C compiler varies according to the system used: Linux The GNU C Compiler (gcc) is usually present, or easily available through the package system.
You can use the --inplace
option:
--inplace (-i) ignore build-lib and put compiled extensions into the
source directory alongside your pure Python modules
setup.py clean
should clean the build dir. setup.py clean --all
cleans all build output.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With