I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
because I'm calling build with --no-isolation I'm using during all processes only locally installed modules
install .whl file in </install/prefix>
run pytest with PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>
Prev version was OK.
Here is pytest output:
```console
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-pytest-checkdocs-2.9.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-pytest-checkdocs-2.9.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.14, pytest-7.1.3, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/pytest-checkdocs-2.9.0, configfile: pytest.ini
plugins: checkdocs-2.9.0
collected 2 items / 1 error
================================================================================== ERRORS ==================================================================================
_____________________________________________________________ ERROR collecting pytest_checkdocs/py310compat.py _____________________________________________________________
/usr/lib/python3.8/site-packages/_pytest/runner.py:338: in from_call
result: Optional[TResult] = func()
/usr/lib/python3.8/site-packages/_pytest/runner.py:369: in
call = CallInfo.from_call(lambda: list(collector.collect()), "collect")
/usr/lib/python3.8/site-packages/_pytest/doctest.py:545: in collect
module = import_path(
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:556: in import_path
raise ImportPathMismatchError(module_name, module_file, path)
E _pytest.pathlib.ImportPathMismatchError: ('pytest_checkdocs.py310compat', '/home/tkloczko/rpmbuild/BUILDROOT/python-pytest-checkdocs-2.9.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/pytest_checkdocs/py310compat.py', PosixPath('/home/tkloczko/rpmbuild/BUILD/pytest-checkdocs-2.9.0/pytest_checkdocs/py310compat.py'))
========================================================================= short test summary info ==========================================================================
ERROR pytest_checkdocs/py310compat.py - _pytest.pathlib.ImportPathMismatchError: ('pytest_checkdocs.py310compat', '/home/tkloczko/rpmbuild/BUILDROOT/python-pytest-checkd...
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================================================= 1 error in 0.19s =============================================================================
```
There's nothing this project can do about these duplicate imports. I seem to recall you were able to work around issues like these by using --import-mode importlib. Maybe that will help.
I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
build
with--no-isolation
I'm using during all processes only locally installed modulesPrev version was OK. Here is pytest output:
Here is list of installed modules in build env