Open ThoreWietzke opened 4 months ago
I found my issue ... I forgot to include the __init__.py
file ...
An example is https://github.com/scikit-hep/boost-histogram/tree/develop/src/boost_histogram/_core, which is a stub (directory) for boost_histogram/_core.so
.
Thanks for that example. I also found the official documentation regarding stubs: https://typing.readthedocs.io/en/latest/source/stubs.html I leave it here so anyone who has the same question can look it up.
Hello,
scikit build core has helped me a lot in packaging and building my C++ extensions. Currently I'm struggling a bit where to place my stub files (*.pyi) to ship type hints and docstrings for extension.
I organize the code inside
src
andinclude
with several subfolders to keep the files organized. I tried placing it directly insrc
,src/{package_name}
,python
andpython/{package_name}
, but it doesn't show up inside my site-packages in my environment?So where do I have to place the stub so it will be picked up correctly? Do I need further settings like
inside my
pyproject.toml
?Further information: I use CMake and pybind11 for my extension.