> Ok, thanks. So if my project uses C++ .cpp and .h files, then it has > some C++ library, then it has some .pyx and .pxd files and some .so > files as a result of cythonzing it, then: > > C++ .so should go to /usr/lib/ > C++ .h files should go to /usr/include
This is only if you want the library available outside of Python. Otherwise, these things can go with the .py files in the package as well. > .pxd and other .py files and the .so as a result of cythonizing should > go along the .py files As I understand it, there are two things that are relevant about the location of the .pxd files: * When you are building your own project, the .pxd files need to be "findable" by Cython. In your case, this finding happens when cmake is used to build call Cython and build extensions to begin with. * When external projects want to use your .pxd files in a cimport statement, they need to know where they are. For that, it is really helpful if your package can provide a get_pxd_include() function that returns the include directory for your pxd files. Something like (for your hermes2d project): hermes2d.get_pxd_include() Another issue for your project, is that people who want to link to it will want to know where the .so and .h files are installed (the actual C++ library). Again, I would simply provide top-level functions for this: hermes2d.get_lib() hermes2d.get_include() With these 3 functions, anyone building Cython package based on your code can quickly find out where everything is installed. The only other thing that could complicate this is if there are any other dependencies that end users need to build against your project. Cheers, Brian ps - I know this is answering more than your initial question and is slightly off topic for this list. > Ondrej > _______________________________________________ > Cython-dev mailing list > [email protected] > http://codespeak.net/mailman/listinfo/cython-dev > _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
