How do you write a setup.py to compile .pyx files in an arbitrary location and install the compiled code in another arbitrary location? For example dirA/spam.pyx to build/dirB/spam.so?
How do you write a setup.py to compile .pyx files in an arbitrary location
Share
According to the distutils documentation, you can build any compiled python modules in an arbitrary location using the command line option
--build-base, e.g.:If you want to keep the default build directory, but install to a custom location, you should use one of the options
--user--home,--prefix,--exec-prefix,--install-baseor--install-platbaseFinally, if you just want the
.sofile in the current directory, use the option--inplace