wjakob / nanobind

nanobind: tiny and efficient C++/Python bindings
BSD 3-Clause "New" or "Revised" License
2.29k stars 191 forks source link

[BUG]: Tests fail: E ModuleNotFoundError: No module named 'test_ndarray_ext' #547

Closed yurivict closed 5 months ago

yurivict commented 5 months ago

Problem description

All tests fail:

_______________________________________________________________________ ERROR collecting tests/test_make_iterator.py _______________________________________________________________________
ImportError while importing test module '/usr/ports/devel/py-nanobind/work-py39/nanobind-1.9.2/tests/test_make_iterator.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_make_iterator.py:1: in <module>
    import test_make_iterator_ext as t
E   ModuleNotFoundError: No module named 'test_make_iterator_ext'
__________________________________________________________________________ ERROR collecting tests/test_ndarray.py __________________________________________________________________________
ImportError while importing test module '/usr/ports/devel/py-nanobind/work-py39/nanobind-1.9.2/tests/test_ndarray.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_ndarray.py:1: in <module>
    import test_ndarray_ext as t
E   ModuleNotFoundError: No module named 'test_ndarray_ext'

Version: 1.9.2 Python-3.9 clang-18 FreeBSD 14.0

Reproducible example code

n/a
wjakob commented 5 months ago

This is a setup issue on your end, likely a Python issue mismatch. Please don't open bug tickets unless you are 100% sure that this is, in fact, a bug with the library.

yurivict commented 5 months ago

@wjakob

I am trying to create the FreeBSD port for nanobind. For this I created a vanilla port in the FreeBSD framework, that runs build/install commands just like for thousands of other Python-based ports.

It builds, but tests fail.

The setup is standard. Why would I believe that there is a setup or python problem when thousands of other ports build and test fine in the exact same environment? What is the problem?