New comment by loreb on void-packages repository https://github.com/void-linux/void-packages/pull/40063#issuecomment-1711759194 Comment: The following (intentionally dirty) diff did it for me: ``` diff --git a/srcpkgs/python3-testfixtures/template b/srcpkgs/python3-testfixtures/template index 6c71aad1..121bad83 100644 --- a/srcpkgs/python3-testfixtures/template +++ b/srcpkgs/python3-testfixtures/template @@ -12,10 +12,11 @@ license="MIT" homepage="https://github.com/Simplistix/testfixtures" distfiles="${PYPI_SITE}/t/testfixtures/testfixtures-${version}.tar.gz" checksum=456ce4f393160f27cd6840a5370ecf4a70f1721737f5e67a2af79e6c817804a4 +export PYTHONDONTWRITEBYTECODE=1 # NOPE do_check() { - cd build/lib - pytest -v --ignore="testfixtures/tests/test_django" # Fails to import + cd testfixtures && + pytest -v --ignore="tests/test_django" # Fails to import } post_install() { ``` RANT: based on stackoverflow, I tried the python bytecode thing (did nothing, I just left it as a reminder that it's useless), then I thought I understood when I read https://docs.pytest.org/en/latest/explanation/goodpractices.html#test-discovery but nope, no way... I still don't know why it went all the way up instead of staying in build/lib, I expected it to stop at lib (you know, the first directory without __init__.py), but if it works it works. And if you need more circular fun... at first I thought maybe they fixed the bug upstream, I tried pytest 7.4.2 and boom! circular dependencies. Sorry for the rant, I just needed it.