-
Thanks for the very useful tool! I am struggling to debug an ImportError that is raised when building and testing a minimal pybind11 project using cibuildwheel. CI config: link The import error reads something like: The project itself is setup as suggested by https://github.com/pybind/cmake_example. The only differences being:
from .mymodule import call_me
try:
from importlib.metadata import version
except ModuleNotFoundError:
from importlib_metadata import version
__version__ = version("mymodule") Oddly enough the tests pass on Ubuntu (see here). At this point I am no longer sure whether the issue lies with cibuildwheel or with the way I am setting up the project. Any help is appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
as package is named On Ubuntu build, contains binary file named You may try to disable tests and download created wheel to manually inspect them. |
Beta Was this translation helpful? Give feedback.
You have the second one in your
__init__.py
..mymodule
meansmymodule
from the current module, which ismymodule/
. So that means you expectmymodule/mymodule.<plat>.so
.Does your shared library sit inside a matching folder, next to the
__init__.py
?I would highly recommend
pybind/scikit_build_example
be followed instead ofpybind/cmake_example
, which is very fragile, by the way.