Skip to content

[3.9] bpo-40854: Allow overriding sys.platlibdir via PYTHONPLATLIBDIR env-var (GH-20605) #20725

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

Merged
merged 1 commit into from
Jun 8, 2020
Merged

[3.9] bpo-40854: Allow overriding sys.platlibdir via PYTHONPLATLIBDIR env-var (GH-20605) #20725

merged 1 commit into from
Jun 8, 2020

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Jun 8, 2020

(cherry picked from commit 8f023a2)

https://bugs.python.org/issue40854

@vstinner
Copy link
Member Author

vstinner commented Jun 8, 2020

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 https://bugs.python.org/issue40854#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 this PR to backport PyConfig.platlibdir and PYTHONPLATLIBDIR env var to Python 3.9.

@ambv: Are you ok to include this change in Python 3.9 final?

cc @hroncok @mcepl @stratakis

@vstinner
Copy link
Member Author

vstinner commented Jun 8, 2020

If this PR is merged, the documentation must be updated in the master branch to replace "3.9" with "3.10" (as I did in this backport).

@ambv
Copy link
Contributor

ambv commented Jun 8, 2020

I'm fine with this landing in 3.9.0 but unless it lands within the next hour or so it will miss Beta 2.

@mcepl
Copy link
Contributor

mcepl commented Jun 8, 2020

LGTM, but, boy, this is getting really complicated! Originally, it was just a simple few lines hack …

+1

@vstinner vstinner merged commit 8175064 into python:3.9 Jun 8, 2020
@vstinner vstinner deleted the platlibdir_env39 branch June 8, 2020 17:36
@vstinner
Copy link
Member Author

vstinner commented Jun 8, 2020

LGTM, but, boy, this is getting really complicated! Originally, it was just a simple few lines hack …

A hack is acceptable for a downstream patch. But upstream, we usually write things differently and it requires more work. Also, when a feature is made upstream, new corner cases are discovered :-)

See also https://bugs.python.org/issue40684 "make install doesn't respect configure --with-platlibdir=lib64".

@vstinner
Copy link
Member Author

vstinner commented Jun 8, 2020

I'm fine with this landing in 3.9.0 but unless it lands within the next hour or so it will miss Beta 2.

Ok, I merged my PR. Thanks @ambv ;-)

@vstinner
Copy link
Member Author

vstinner commented Jun 8, 2020

If this PR is merged, the documentation must be updated in the master branch to replace "3.9" with "3.10" (as I did in this backport).

I created PR #20735.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants