Message399316
| Author |
uranusjr |
| Recipients |
dstufft, eric.araujo, frenzy, hroncok, uranusjr, vstinner |
| Date |
2021年08月10日.12:10:15 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1628597415.98.0.497418419427.issue44860@roundup.psfhosted.org> |
| In-reply-to |
| Content |
> I'm not sure if it should be used to install libraries in $HOME/.local/lib64 rather than $HOME/.local/lib. Previously, Fedora already used $HOME/.local/lib and $HOME/.local/lib64 is not in the sys.path.
This was also briefly discussed in bpo-1294959, but did not go through since "changing posix_user should have no impact on end users".
> Does the site module add $HOME/.local/lib64 to sys.path if it exists?
It does not, only lib is checked right now.
https://github.com/python/cpython/blob/c7ea1e3dcea6fbc9842463ce2b785b43501b1eaa/Lib/site.py#L288-L298
----
There are two possible solutions from what I can tell. We could just make posix_user match posix_prefix and always respect sys.platlibdir. This could be confusing to existing Python 3.9 users however since many of them already pip-installed things into ~/.local/lib and this would make their user-site packages split in two locations. The other would be to restore the pre-3.9 behaviour in sysconfig to use lib instead of depending on sys.platlibdir. I don’t know who uses sysconfig right now and can’t say what would break, but for pip this would be less disruptive since it currently installs things into ~/.local/ib (provided by distutils). |
|