pytest ffi failure with a new port
- Reply: Kubilay Kocak : "Re: pytest ffi failure with a new port"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 28 Sep 2021 21:38:48 UTC
Hi. I am trying to get Wayland backend for x11-wm/qtile running, which requires three new dependencies: https://codeberg.org/ei/ports/commits/branch/qtile I want to use tests/ in ports (i.e. x11/py-xkbcommon), so I added: +do-test: + @cd ${WRKSRC}/tests && ${PYTHON_CMD} -m pytest -v -rs + to the Makefile, but make test results in: ==================================== test session starts ==================================== platform freebsd14 -- Python 3.8.12, pytest-4.6.11, py-1.9.0, pluggy-0.13.1 -- /usr/local/bin/python3.8 cachedir: .pytest_cache rootdir: /usr/local/poudriere/ports/main/x11/py-xkbcommon/work-py38/xkbcommon-0.4 collected 0 items / 1 errors ========================================== ERRORS =========================================== ____________________________ ERROR collecting tests/test_xkb.py _____________________________ ImportError while importing test module '/usr/local/poudriere/ports/main/x11/py-xkbcommon/work-py38/xkbcommon-0.4/tests/test_xkb.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: test_xkb.py:6: in <module> from xkbcommon import xkb ../xkbcommon/xkb.py:5: in <module> from xkbcommon._ffi import ffi, lib E ModuleNotFoundError: No module named 'xkbcommon._ffi' !!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!! ================================== 1 error in 0.16 seconds ================================== *** Error code 2 I rg'ed the ports tree for various ways around this, but nothing worked, including PYTHONPATH, etc. I have no idea why it can't find 'xkbcommon._ffi'. This port links to libxkbcommon, and the default x11-wm/qtile desktop with Wayland backend *seems* to be working. The same happens for other two ports (*._ffi not found). Any idea what can be done with do-test?