Hi,
I'm getting the ImportError from subject specifically when building python-plotnine for f36 (Python 3.10.7). The same package builds fine for f37 and rawhide (Python 3.11.0).
The module the test is trying to import from is present in tests/, so I'm a bit stupefied as to why this fails. I also tried with putting an empty __init__.py in tests/. But this fails with an OSError in conftest.py.
Copr build: https://copr.fedorainfracloud.org/coprs/gui1ty/neuro-sig/build/4988240/
Cheers,
On 26. 10. 22 19:40, Sandro wrote:
Hi,
I'm getting the ImportError from subject specifically when building python-plotnine for f36 (Python 3.10.7).
Yes, importing from .conftest in tests should not be possible.
The same package builds fine for f37 and rawhide (Python 3.11.0).
Maybe pytest somehow made this work? It¨s not just Python 3.11 but also pytest 7.
The module the test is trying to import from is present in tests/, so I'm a bit stupefied as to why this fails. I also tried with putting an empty __init__.py in tests/. But this fails with an OSError in conftest.py.
Do you happen to have the exact OSError with a traceback? Maybe it's not related.
On 27-10-2022 17:25, Miro Hrončok wrote:
On 26. 10. 22 19:40, Sandro wrote:
Hi,
I'm getting the ImportError from subject specifically when building python-plotnine for f36 (Python 3.10.7).
Yes, importing from .conftest in tests should not be possible.
The same package builds fine for f37 and rawhide (Python 3.11.0).
Maybe pytest somehow made this work? It¨s not just Python 3.11 but also pytest 7.
True. I guess this needs to be reported upstream then.
The module the test is trying to import from is present in tests/, so I'm a bit stupefied as to why this fails. I also tried with putting an empty __init__.py in tests/. But this fails with an OSError in conftest.py.
Do you happen to have the exact OSError with a traceback? Maybe it's not related.
I do:
../../BUILDROOT/python-plotnine-0.10.1-2.fc36.x86_64/usr/lib/python3.10/site-packages/tests/conftest.py:30: in <module> raise OSError( E OSError: The baseline image directory does not exist. This is most likely because the test data is not installed. You may need to install plotnine from source to get the test data.
This is caused by a test in conftest.py itself:
https://github.com/has2k1/plotnine/blob/1da5d2b739e904f2c1ce97d2ba4e3a84129d...
-- Sandro
python-devel@lists.fedoraproject.org