Skip to content

bpo-41282: Fix broken make install - #26327

Closed
ned-deily wants to merge 1 commit into
python:mainfrom
ned-deily:sysconfig_pythoon_build_main
Closed

bpo-41282: Fix broken make install#26327
ned-deily wants to merge 1 commit into
python:mainfrom
ned-deily:sysconfig_pythoon_build_main

Conversation

@ned-deily

@ned-deilyned-deily commented May 24, 2021

Copy link
Copy Markdown
Member

A previous commit broke a check in sysconfig when building cpython itself.
This caused builds of the standard library modules to search a wrong
location (the installed location rather than the source directory) for
header files with the net effect that a make install
incorrectly caused all extension modules to be rebuilt again and
with incorrect include file paths.

https://bugs.python.org/issue41282

A previous commit broke a check in sysconfig when building cpython itself.
This caused builds of the standard library modules to search a wrong
location (the installed location rather than the source directory) for
header files with the net effect that a ``make install``
incorrectly caused all extension modules to be rebuilt again and
with incorrect include file paths.
@ned-deilyned-deily added the needs backport to 3.10 only security fixes label May 24, 2021
ned-deily referenced this pull request May 24, 2021
With this patch, `distutils.command.install.INSTALL_SCHEMES` are loaded from
`sysconfig._INSTALL_SCHEMES`.
The distutils module is deprecated and will be removed in 3.12 (PEP 632).
This change makes the `sysconfig._INSTALL_SCHEMES` the single point of truth
for install schemes while keeping `distutils.command.install.INSTALL_SCHEMES`
exactly the same. If we, during the transition to the sysconfig, change
something, this makes sure that it also propagates to distutils until the
module gets removed.
Moreover, as discussed [on Discourse], Linux distros need to patch
distutils/sysconfig to make sure the packages will land in proper locations.
This patch makes it easier because it leaves only one location where install
schemes are defined which is much easier to patch/adjust.
[on Discourse]: https://discuss.python.org/t/pep-632-deprecate-distutils-module/5134
The implementation is slightly different than the plan but I think it's the
easiest way how to do it and it also makes the downstream patch simple,
flexible and easy to maintain.
It's also necessary to implement this before setuptools starts bundling
the distutils module so the default install schemes stay in the standard library.
The removed code from sysconfig does not seem to have any negative effect
because, honestly, it seems that nothing actually uses the install schemes
from sysconfig at all. There were many big changes in these modules where
they were trying to include packaging in stdlib and then reverted that.
Also, the test of distutils install command does not count with the different
locations which is good evidence that the reason to have this piece of code
is no longer valid.
https://bugs.python.org/issue41282
@encukou

Copy link
Copy Markdown
Member

GH-26329 has my analysis so far and attempt at a fix.

@frenzymadness is unavailable until tomorrow, FWIW.

@ned-deily

Copy link
Copy Markdown
MemberAuthor

GH-26329 is a better solution. Let's go with that. Thanks, @encukou!

@ned-deily
ned-deily deleted the sysconfig_pythoon_build_main branch May 24, 2021 19:50
@jaracojaraco mentioned this pull request May 9, 2022
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@ned-deily@encukou@the-knights-who-say-ni@bedevere-bot