My project mix pure Python code, and Cython extensions for optimization and for linking with C libraries. I have one source tree for my Python project, and one for Cython and C code. My Cython extensions each have a setup.py file to build them. Actually, for each extension, I do the following:
python setup.py build_ext --inplace
mv myext.so ../some/specific/place/
Is there a way to specify to distutils where to install my extension (if possible, using a relative path), instead of using --inplace
followed by mv
? Using --prefix
option isn't good, since it creates a hierarchy of folders I don't need.
I finally found the answer! The option is -b (or --build_lib)
python setup.py build_ext -b ../some/specific/place/
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