How to ship Cython pxd header files and other auxiliary files #684
-
|
Cython Option 1: Option 2: Thanks for your help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
If you want to install data files (e.g., For the second part: the reason you need to move
|
Beta Was this translation helpful? Give feedback.
If you want to install data files (e.g.,
.pxdheaders), thenpy.install_sourcesis indeed the easiest way.For the second part: the reason you need to move
.pxdfiles and__init__.pyfiles to a build directory is that Cython looks at those by default to determine the correct name for the extension module it is building. There are two options to fix this:fs.copyfile, as you pointed out. It's not an either/or withpy.install_sources, you can use both (don't useinstall: trueforfs.copyfile). We do this in SciPy.cythontakes a--module-nameargument, which you can use to tell it the extension name (e.g., scipy.linalg._matfucs`); this should prevent Cython from trying to walk the director…