How to install Cython files next to their files inside the repo, instead of in build/
directory
#11266
-
Hi, My question is how do you specify to not use a build directory when building Cython files? I am trying to use Meson to build and install Cython files locally such that their compiled files are next to their pyx/pxd files inside the repo. This is similar to how in scikit-learn, you can do I use the following command
When I then run ninja:
Internally, I use a I want the output file instead to be:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
It is in meson design philosophy to build all projects out-of-source. Therefore, I think you must think the problem in a different way. To be able to load the generated .so files, one thing you could do it to add the build directory the the PYTHONPATH. If this doesn't work for you, another approach would be to copy the source files to the build directory. using |
Beta Was this translation helpful? Give feedback.
-
I think the only reason this matters is for the sake of editable installs, right? (To allow other projects to then detect scikit-tree and make use of the cython headers in their own builds.) So perhaps overall it's a better idea to make meson-python (the PEP 517 backend) support this transparently. |
Beta Was this translation helpful? Give feedback.
I think the only reason this matters is for the sake of editable installs, right? (To allow other projects to then detect scikit-tree and make use of the cython headers in their own builds.)
So perhaps overall it's a better idea to make meson-python (the PEP 517 backend) support this transparently.