This is the classic issue where the “un-built” package gets imported
instead of the “built” one in the buildroot that you are trying to test.
I had some luck executing the tests, but ran into a BLAS linking issue
that I did not have time to investigate fully. Please see
https://bugzilla.redhat.com/show_bug.cgi?id=2133438#c1.
– Ben
On 10/11/22 05:50, Sandro wrote:
> Hi,
>
> I'm stuck at trying to get tests to run for a Python package I
> submitted for review [1].
>
> During build the package generates skmisc/__config__.py, which is
> needed by pytest. I copied it over from %pyproject_build_lib/skmisc
> only to hit another ImportError:
>
> E ModuleNotFoundError: No module named 'skmisc.loess._loess'
>
> The only thing that comes close is the library:
>
> skmisc/loess/_loess.cpython-311-x86_64-linux-gnu.so
>
> However, there's a _loess.pyx in skmisc/loess/src/.
>
> So, before taking this back upstream [2], I thought I check here if I
> may have missed some (post) build steps or if the approach taken by
> scikit-misc is simply not feasible in the RPM build environment.
>
> For the spec file in review I'm using %pyproject_check_import -t,
> which succeeds. But I'd like to run the tests if at all possible.
>
> [1]
https://bugzilla.redhat.com/show_bug.cgi?id=2133438
> [2]
https://github.com/has2k1/scikit-misc/issues/19