-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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
Allow overriding sys.platlibdir: add PYTHONPLATLIBDIR env var #85031
Comments
You can currently point the python interpreter to a different install say via
With the newly added platlibdir [1], if python was configured with platlibdir=lib64, this will break because i.e. the site-packages dir as returned by This PR adds the possibility to override the platlibdir via environment variable. Full rationale: [2]. [1] #8068 |
Fedora and OpenSUSE Linux distributions were using a downstream patch which replaced /lib/ with /lib64/ for like 15 years. Is this issue a new issue? Or did Fedora always had the issue for example? Which Linux distribution are you using? |
I'm on Fedora. My use case is for the mingw-python package I maintain there, see [1] for the full details. I believe (though I haven't investigated) that the previous downstream lib64 patch behaved slightly differently, or that something else between python-3.8 and earlier and python-3.9 changed, in that I didn't have lib64 appear in the site packages path previously when invoking python as detailed in [1], whereas it now does. [1] https://src.fedoraproject.org/rpms/python3.9/pull-request/10#comment-0 |
I merged the patch in master, future Python 3.10. I would prefer to leave Python 3.9 unchanged, if possible. Can we close this issue? |
Many thanks! - I'll ask downstream to carry the patch for the 3.9 cycle, so I'm ok with closing. |
bpo-1294959 added sys.platlibdir and configure --with-platlibdir to use /usr/lib64 on Fedora and SuSE to Python 3.9. The problem is that msg370655 use case seems to be a regression compared to Python 3.9. I now consider to backport the commit 8f023a2 to 3.9 since it looks like a fix part of bpo-1294959 rather than a bug fix. I created PR 20725 to backport PyConfig.platlibdir and PYTHONPLATLIBDIR env var to Python 3.9. |
Thanks Sandro Mani. The new env var should be part of the incoming Python 3.9.0 beta3. |
Follow-up: bpo-40947 "Replace PLATLIBDIR macro with config->platlibdir". |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: