-
Notifications
You must be signed in to change notification settings - Fork 20
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
Python path detection doesn't work on Debian #111
Comments
Looks like something changed in Python 3.10, I originally tested the change with 3.9 where it works as expected:
but not so much with 3.10
so it looks like we need a different approach. Btw. it's interesting that we don't see this in Fedora, we should have the same problem with RPM packaging on Fedora 36 and newer. |
I am not going to pretend I fully understand what happened in Python 3.10, but the root of the problem is that both Debian and Fedora change the sysconfig module to always return We probably need a different approach when getting the Python path than this, I'll try to ask someone from our Python team for help. Reverting back to the distutils module is probably a "good enough" solution for now. |
Nod, I'll probably revert this particular commit downstream for now until a proper solution has been found. |
btw, this will affect libblockdev as well once storaged-project/libblockdev@feaec37 is merged into |
Fedora decided to change the sysconfig behaviour, because it broke other things too (rhbz2026979 and rhbz2097183) and the code from my comment above now works with Python 3.10 too. So I think the behaviour in Debian should also probably be considered to be a bug. I might be able to come up with some fix in libbytesize (we still have some time before distutils removal in 3.12) but so far I didn't find anything useful. (I guess I could hardcode the |
Fedora's change does look somewhat related, but definitely not the same. Without looking at your code in detail, I'd suggest explicitly selecting the posix_prefix scheme, with the supplied prefix. |
Using the
|
That's true. Within Debian's build system, that wouldn't be an issue, because we'd move things around to work, but you want to work outside that, too. So, yeah, if you want to select |
I looked at the Debian patch again and if I understand it correctly we might not need to change anything:
so inside the Debian build system the scheme should default to
|
@vojtechtrefny I somehow missed your last comment but on #debian-devel it was also mentioned that See also https://debbugs.gnu.org/cgi/bugreport.cgi?bug=54412 |
I wish there was a way to make this work in our code, but if the |
Somehow this change broke the Debian build.
Notice how it installs the files in /usr/local despite using
--prefix=/usr
Reverting this commit, I get:
A few warnings but installed into the proper path
Originally posted by @mbiebl in #98 (comment)
The text was updated successfully, but these errors were encountered: