I'm new to Cython, so I might be missing something obvious, but I've read through the documentation and been banging my head against this for a while.
I have a *.pyx
file that I build using a setup.py
file as follows:
from distutils.core import setup
from Cython.Build import cythonize
setup(
ext_modules=cythonize("path/to/helpers.pyx"),
)
That works fine, and I can now import path.to.helpers
from sister directories and subdirectories without any issues.
Now, recently I decided I want to add a helpers.pxd
file as well, so I can cimport
parts of it to other Cython modules. I've added a helpers.pxd
in path/to
to facilitate this, but when I try to cimport path.to.helpers
, I get
path/to/helpers.pxd not found
errors. Do I need to change something in my setup.py
file to allow cimport
ing from the *.pxd
file?
None of the docs I've found say anything about doing this, and I feel like I've tried everything without any luck. Ideas?