-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
(bisected) ImportError on meson configure
#10892
Comments
Try reconfiguring with --wipe. When you track meson master we don't guarantee an existing build dir keeps working |
It fails when running |
I think you have a mismatch of meson versions installed. Try clearing your .local and reinstall meson. |
@xclaesse I've just tried it in a clean venv, and unfortunately it still doesn't work. It has no access to system or user site-packages. It still produces the same error.
I can reproduce it in the interpreter within the venv as well:
Meson was installed with |
The traceback comes from mesonmain.py, in Now, the interesting thing about this claim is that it is about meson configure, when literally any meson command will import the same files (other than --internal) during the startup mesonmain command line parser. In other words, the error report is that Meson is so fundamentally, utterly broken, that attempting to use it in any way shape or form, even just invoking it with the --help option, across any subcommand without exception, doesn't work. We should have full 100% CI failures across every individual test case, and likely also when trying to execute the unittest harness too, and attempting to test that commit before submitting a PR should be so broken that it's mind boggling that it ever got This seems bogus, of course. There must be a better explanation. The other problem is that:
Conclusion: this is a very real bug... but it's not a Meson bug.
I don't think this is a mismatch of Meson versions installed, something that typically refers to having one version in /usr/lib/python3.X and another version in ~/.local/lib/python3.X. I think this is a deeply, deeply, deeply broken setuptools invocation. Using No matter how many times you uninstalled Meson, or used a venv, the bug was in your source tree (but not in meson's git repository). The general lesson to take from here is that Fortunately, building from an sdist downloaded from PyPI works flawlessly. Also flawless: low-level tooling on top of setuptools, such as distro build scripts. The general solution to this is eli-schwartz@6a24f13 -- Meson will be growing the ability to install python pyproject.toml metadata, create wheels, etc. -- and it will dogfood this in order to be fully self-sufficient for building and installing Meson without relying on external dependencies such as setuptools. Conveniently, this also means that we can rely on Meson's actually accurate knowledge of what needs to be installed. |
@eli-schwartz your assessment seems correct, running
Every other command was affected as well, I'm honestly not sure what led me to believe it was just |
It's an obscure setuptools edge case. Well, I say obscure because how often do people change a Still, I anticipate using |
@eli-schwartz thanks for the explanation, I did not know all that! |
Describe the bug
To Reproduce
Run
meson configure
in any directory.Expected behavior
No crash.
system parameters
CC @xclaesse
The text was updated successfully, but these errors were encountered: