-
Notifications
You must be signed in to change notification settings - Fork 928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uv doesn't play well with meson-python build backend and pytest #8966
Comments
Would you mind sharing a full reproduction? Like a repository (as mentioned at the end) and a sequence of commands? |
Thank you for your quick reply. The repository in question is available here: https://github.com/hacksparr0w/argon2 I'm using the following commands to get the environment up and running: docker run --volume C:\Users\hacksparr0w\argon2:/app -it python:3.12 bash Then once in the container: cd /app
pip install uv
uv run pytest |
There's known incompatibilties with meson-python as it does not work well with build isolation. Some of this was primarily discussed in #7857 |
Maybe related: |
@woutervh I think this is unrelated to this issue 😄 In your case, it seems that error is related to using an For example, the pkgconfig bundled in the uv standalone python downloads will not contain the paths meson expects. So even if you set You can also instead leverage @bluss sysconfigpatcher to adjust the uv python downloads to make this simpler. TL;DR uv python install 3.9.20
uv venv -p 3.9
uv tool install 'git+https://github.com/bluss/sysconfigpatcher'
sysconfigpatcher $HOME/.local/share/uv/python/cpython-3.9.20-linux-x86_64-gnu
uv pip install dbus-python |
I'm having problems running tests in my project using the meson-python build backend. Whenever I run pytest using
uv run pytest
, the command fails due to a module resolution issue.The exact commands to reproduce this with their output are below.
meson-python allows for using non-temporary build folders by passing the
-Cbuild-dir
argument, but I had no luck even when using this option, as seen below.All of the commands above were run in a clean
python:3.12
Docker container. The python version used was3.12.7
. The uv version used was0.5.1
.Following is my pyproject.toml file.
I can link the repository in question, if necessary.
The text was updated successfully, but these errors were encountered: