-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
modules/python: fix path introspection on virtual environments on Debian #9388
Conversation
Signed-off-by: Filipe Laíns <lains@riseup.net>
Signed-off-by: Filipe Laíns <lains@riseup.net>
On top of #9335 to prevent conflicts when that gets merged. |
@eli-schwartz can you have a look? cc @rgommers @ev-br |
Codecov Report
@@ Coverage Diff @@
## master #9388 +/- ##
==========================================
- Coverage 67.29% 64.16% -3.14%
==========================================
Files 396 198 -198
Lines 85410 42662 -42748
Branches 17481 8730 -8751
==========================================
- Hits 57474 27372 -30102
+ Misses 23246 12992 -10254
+ Partials 4690 2298 -2392 Continue to review full report at Codecov.
|
Confirm that it fixes ev-br/mc_lib#45. The warning is still there,
but the installed files are in |
Since these are just heuristics, and might break, it makes sense to keep the warning. |
The heuristic is correctly reporting that this PR doesn't actually fix anything, because the files are still installed to a location that is not on What's the goal here? |
sigh |
To elaborate: while it would be nice to teach the python module to install to the virtualenv location, it doesn't seem like this commit does that. Instead, non-Debian systems are unaffected, and Debian systems revert back to installing to Can you explain what workflow this commit is trying to unblock, and how it accomplishes it? |
That is not true.
|
But the python module will still install to And, even with the PR, the warning message is still appearing which states that What am I missing here? |
No, it will not. You will just be much more likely to run into #9284, which is its own separate issue. Meson will mangle the installation path if it does not match the installation prefix, but that has nothing to with the introspection. This PR makes the introspection script return the correct path. Currently, the introspection script will use the In the future please be more mindful with how you reply. Stating that the "PR doesn't actually fix anything" without any properly looking into the issue, and following that with "What's the goal here?", is not very constructive. Meson makes various wrong assumptions about Python and install paths. This is a complex issue, made even more complex by Meson's inherently incompatible approach with Python's install path design. I have been trying to make it slightly more correct/reliable, but it's a frustrating getting feedback that my small fixes are wrong when the actual issue is the whole approach Meson takes to installing Python modules. I don't know, maybe I am being overly sensitive but, well, that is the current reality of my mental health. This whole ordeal (bad downstream patching of Python locations) has already taken a pretty big toll, being the person that gets to go to the different parties and brings up a bunch of issues and tries to get them to have coherent understandings of how install locations in Python work is not very fun. Anyway, sorry for the small rant, just please don't dismiss things unless you are 100% sure, I am tired from trying to put out fires all over the place. edit: To clarify, as my message was poorly written |
From a user perspective, this PR does fix a rather annoying usability inconvenience.
This might be, but that's not the point. What this PR allows is to have Basically, an expectation is that with an explicit
Which is exactly the point :-). W.r.t. the |
I agree - and it's also phrased oddly, to me "broken Python install" means "Python itself is broken somehow" (e.g., missing dev headers that are needed), not "your project may not work if installed". I'd be happy to submit a PR with a rephrase if that is welcome. |
I disagree with this expectation and believe that if you "have to" use PYTHONPATH then the warning is correct and the problem is not (fully?) solved. And the solution to finding the files in a stable location for adding to the PYTHONPATH, is to use -Dpython.platlibdir -Dpython.purelibdir as suggested (e.g. to The solution to installing the files to the correct OOTB location will involve installing to the venv and completely ignoring the Long term it would be nice for e.g. |
Signed-off-by: Filipe Laíns lains@riseup.net