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
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
On 11-10-2022 16:20, Ben Beasley wrote:
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.
Thanks, Ben. Down the rabbit hole we go!
🤔 Just who flagged this as 'good first issue'?
-- Sandro
PS: I used to go by 'whiterabbit' for some time years ago. My past is haunting me...
On 11-10-2022 22:22, Sandro wrote:
On 11-10-2022 16:20, Ben Beasley wrote:
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.
Thanks, Ben. Down the rabbit hole we go!
🤔 Just who flagged this as 'good first issue'?
Full disclosure: The error Ben ran up against and which I encountered earlier (but put aside instead of investigating) was due to the use of OpenBLAS instead of the required FlexiBLAS.
On the upside: I'll have a much more relaxed weekend now. ;)
Thanks everyone who helped with this and earlier issues I had packaging python-scikit-misc.
-- Sandro
python-devel@lists.fedoraproject.org