This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Deprecate and remove distutils
Type: Stage: patch review
Components: Distutils Versions: Python 3.11, Python 3.10
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Arfrever, FFY00, brett.cannon, christian.heimes, doko, dstufft, eric.araujo, frenzy, hroncok, hugovk, ionelmc, jaraco, lukasz.langa, methane, miss-islington, ncoghlan, ned.deily, p-ganssle, pablogsal, paul.moore, petr.viktorin, steve.dower, xtreak
Priority: normal Keywords: patch

Created on 2020-07-12 08:30 by jaraco, last changed 2022-04-11 14:59 by admin.

Pull Requests
URL Status Linked Edit
PR 23142 merged steve.dower, 2021-01-22 17:20
PR 24355 merged steve.dower, 2021-01-27 21:20
PR 24549 merged frenzy, 2021-02-16 12:57
PR 24657 merged methane, 2021-02-26 04:24
PR 25405 merged vstinner, 2021-04-14 13:39
PR 25406 merged vstinner, 2021-04-14 14:00
PR 25571 merged christian.heimes, 2021-04-24 07:25
PR 25718 open FFY00, 2021-04-29 12:53
PR 26327 closed ned.deily, 2021-05-24 07:57
PR 26329 merged petr.viktorin, 2021-05-24 12:21
PR 26336 merged miss-islington, 2021-05-24 22:49
Messages (44)
msg373548 - (view) Author: Jason R. Coombs (jaraco) * (Python committer) Date: 2020-07-12 08:30
Setuptools has adopted distutils as outlined in [pypa/packaging-problems#127](https://github.com/pypa/packaging-problems/issues/127). Although there are some straggling issues, the current release of Setuptools fully obviates distutils if a certain environment variable is set. Soon, that behavior will be default.

Additionally, the distutils codebase remains maintained at [pypa/distutils](https://github.com/pypa/distutils) in a form suitable for releasing as a third-party package, should the need arise (i.e. pip install distutils).

The plan now is to freeze, deprecate, and in Python N + 0.1, remove distutils.

Already, Setuptools is identifying emergent bugs and other defects in distutils and providing fixes for them (issue41207, [pypa/setuptools#2212](https://github.com/pypa/setuptools/issues/2212)). Keeping these changes in sync across three repos and different supported versions is tedious, so I'd like to move forward with the deprecation process as soon as possible.
msg373549 - (view) Author: Jason R. Coombs (jaraco) * (Python committer) Date: 2020-07-12 08:33
Łukasz, would it be possible to add the deprecation warning and documented deprecation to Python 3.9?
msg373586 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2020-07-13 07:28
So what is the plan to continue to support building cpython itself which depends on Distutils? Currently the build bootstraps itself without the aid of an existing Python interpreter instance. There would also be major impacts across the whole cpython development process. For example, there are many open Distutils issues in the bugs.python.org bug tracker. We need a plan on how those are to be handled (and that should take into account the expected transition from b.p.o to GitHub issues).  People will continue to submit issues agains Distutils there so triage team members and core developers need to know how to handle such issues.  What if an issue applies also or only to a previous release branch (i.e. where Distutils is still in the repo)?  What about Distutils documentation in the Python docset?  THose are just some off the top of my head.

I don't think any of these issues are necessarily blockers but they need to be planned for and reviewed.  I think a PEP is definitely in order for a change of this magnitude.
msg373612 - (view) Author: Łukasz Langa (lukasz.langa) * (Python committer) Date: 2020-07-13 16:43
It's too late to add a new deprecation in the Python 3.9 cycle. Next week is the *last* beta release. Most beta testing already took place.
msg373613 - (view) Author: Paul Ganssle (p-ganssle) * (Python committer) Date: 2020-07-13 16:50
> So what is the plan to continue to support building cpython itself which depends on Distutils? Currently the build bootstraps itself without the aid of an existing Python interpreter instance. There would also be major impacts across the whole cpython development process.

My understanding was that the plan was to move the standard library distutils into a private module somewhere in the standard library and presumably to slim it down to only the bare minimum required for what is necessary to build Python itself. We're really only concerned with the use of distutils to build packages.

> For example, there are many open Distutils issues in the bugs.python.org bug tracker. We need a plan on how those are to be handled (and that should take into account the expected transition from b.p.o to GitHub issues).  People will continue to submit issues agains Distutils there so triage team members and core developers need to know how to handle such issues. What if an issue applies also or only to a previous release branch (i.e. where Distutils is still in the repo)?

As far as I can tell we've already been telling people that issues in distutils should be fixed in setuptools instead for a few years. I don't think anything needs to be done about the currently open distutils tickets before we *deprecate* distutils, though during the deprecation period we'll probably want to decide whether we want to migrate them, do a mass closure or just leave them to be ad hoc closed as people stumble upon them later. Mass closure may be complicated because tickets affecting CPython itself will still need to be addressed.

> What about Distutils documentation in the Python docset?  THose are just some off the top of my head.

The distutils documentation is already basically just a warning page that says "stop using distutils": https://docs.python.org/3/library/distutils.html#module-distutils

Before these reference materials are removed from the docs we'll need to make sure that all the stuff that's still supported is documented on the setuptools side.

> I don't think any of these issues are necessarily blockers but they need to be planned for and reviewed.  I think a PEP is definitely in order for a change of this magnitude.

A PEP may be a good idea, but I do think the change doesn't have a particularly large magnitude. Anyone using setuptools or pip has already been getting setuptools' monkey-patched version of distutils for ages now, and soon they will be getting setuptools' vendored version. The documentation already indicates that distutils is at least soft-deprecated in favor of setuptools and we've already been directing issues and PRs to setuptools instead of distutils. This last piece is really formalizing something we've been incrementally working towards for a long time now. Doesn't mean we shouldn't do it carefully and with a lot of notice, but it's also not a sudden and massive shift.
msg373614 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2020-07-13 16:52
Deprecating in 3.10 is fine - everyone who needs to know about it releases whenever they like anyway, so we just need to make _some_ announcement.

I'd propose either moving it to Tools/distutils, or renaming it to _distutils. The point is that we're saying it's only fit for use for the core build now, and nobody else should ever import it (or complain about it ;) ).
msg373615 - (view) Author: Donald Stufft (dstufft) * (Python committer) Date: 2020-07-13 16:54
Maybe it would make sense to remove distutils from the name completely, _buildutils or something. Dunno, seems like it might be reasonable just to further separate it from the concept of "distutils" the public library.
msg373622 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2020-07-14 00:15
FYI PEP 387 (which I expect will be accepted once I catch up from vacation) specified deprecations are to be public for two releases before removal or approval from the SC for a shorter cycle.

So if distutils is deprecated in 3.10 then it can be removed in 3.12 or you can ask the SC for an exemption to do it in 3.11.
msg373629 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2020-07-14 08:48
> It's too late to add a new deprecation in the Python 3.9 cycle

Please can we add a note in 3.9, that it will be deprecated in 3.10?
msg373630 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2020-07-14 08:59
Renaming distutils to _buildutils only delays the problem to remove it.  But yes, it explicitly makes it explicit that code needs to be changed.

I would like to see that neither distutils or _buildutils is installed by default, and only is available internally for building the extensions of CPython.

The "old" build system to build builtins instead of extensions is still functional, so it should be ok to build the extensions also with the old build system.

That would require moving all the config stuff in setup.py to autoconf tests, which is perfectly doable.  The MacOS and Windows builds would need some attention too, but afaicr when asking Ned Deily and Steve Dower at the language summits, they didn't have a concern about this approach.
msg373631 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2020-07-14 09:15
+1

I would like to propose three changes:

1) rename distutils, either _distutils or _buildutils sounds good to me
2) make distutils a build-only dependency and no longer install it with make install and other install targets
3) start to build extensions from Makefile or Modules/Setup

For (3) we have to move some checks into autoconf and maybe extend Modules/Setup to support conditional compilation.
msg373633 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2020-07-14 09:39
> A PEP may be a good idea, but I do think the change doesn't have a
> particularly large magnitude. Anyone using setuptools or pip has
> already been getting setuptools' monkey-patched version of distutils
> for ages now, and soon they will be getting setuptools' vendored
> version. The documentation already indicates that distutils is at
> least soft-deprecated in favor of setuptools and we've already been
> directing issues and PRs to setuptools instead of distutils.

I don't think it's a good idea to replace bad habits from distutils with bad habits in setuptools._distutils.  And this is exactly what you get with pointing directly to setuptools.

While splitting out distutils to a separate package in a Linux distro, I found some creative usages at runtime of a package (see my lightning talk at the language summit 2018, and [1]).  From my point of view, CPython should provide documentation how to forward-port these issues without using setuptools._distutils.

Currently setuptools only has one component (pkg_resources, [2]) which is used at runtime.  I dislike it if more than that is used at runtime of a package.

[1] https://mail.python.org/archives/list/distutils-sig@python.org/thread/74WZ7D3ARF7B3N6MAV2JBV3DW6TRHFIV/
[2] https://github.com/pypa/setuptools/issues/863
msg373649 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2020-07-14 17:08
The Windows build doesn't depend on distutils at all. We've had dedicated build scripts for each module since before I started contributing.
msg373651 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2020-07-14 17:28
The Windows build system didn't use setu.py even before I upgrade the VS build system to VS 2010.
msg373652 - (view) Author: Paul Ganssle (p-ganssle) * (Python committer) Date: 2020-07-14 18:03
> I don't think it's a good idea to replace bad habits from distutils with bad habits in setuptools._distutils.  And this is exactly what you get with pointing directly to setuptools.

These are two different questions. We're not asking people to migrate to `setuptools._distutils` (a private module which may not continue to exist in that location), `setuptools` is *adopting* `distutils`, such that `distutils` is a project provided by `pip install distutils` (mind you, this is happening independent of what the standard library does — the only question is whether `import distutils` continues to work if you don't have `setuptools` installed).

> While splitting out distutils to a separate package in a Linux distro, I found some creative usages at runtime of a package (see my lightning talk at the language summit 2018, and [1]).  From my point of view, CPython should provide documentation how to forward-port these issues without using setuptools._distutils.

At this point, the extent of CPython's documentation on this should probably be, "We are removing `distutils` and moving it into the `setuptools` namespace. In future versions, you will need to install `setuptools` to import the `distutils` package." `setuptools` should almost certainly deprecate `distutils` and probably remove large swathes of it in the process, but that's probably on a case-by-case basis, and it's a separate issue from what needs to happen in CPython.

> Currently setuptools only has one component (pkg_resources, [2]) which is used at runtime.  I dislike it if more than that is used at runtime of a package.

I don't think anyone is planning to recommend the use of *any* `setuptools`-provided packages at runtime, including `pkg_resources`. This move is actually a good one from that point of view, because it will require that projects using `distutils` declare a *runtime* dependency on `setuptools`, which will, hopefully, raise some eyebrows. Better than the current situation, where these dependencies are totally undeclared (though probably worse than if `setuptools`, `pkg_resources` and `distutils` were all separate PyPI packages).
msg373653 - (view) Author: Paul Ganssle (p-ganssle) * (Python committer) Date: 2020-07-14 18:54
Oops, just realized my previous post said `pip install distutils`. I meant to say that `pip install setuptools` will provide the `distutils` module (right now you do `import setuptools; import distutils` and you get the setuptools-provided version; we're working on a version where `import distutils` comes from `setuptools` regardless of the import order).
msg376390 - (view) Author: (yan12125) * Date: 2020-09-04 17:44
I noticed that a new PEP draft [1] about deprecating distutils is uploaded. The current version [2] proposes to deprecate distutils in 3.10 and 3.11 and remove distutils in 3.12.

[1] https://www.python.org/dev/peps/pep-0632/
[2] https://github.com/python/peps/commit/5d5c68517cf9087e104673f7f8322311e31a4e0a
msg385812 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-01-27 21:24
That PR is just to add the import warning and update docs. I want to make sure that's in asap so we don't miss the release.

Is there anywhere else in the docs that needs a note? Distutils has been marked as deprecated for years already, so it's really just emphasising that and adding the 3.12 removal date. I think whatsnew, library and the old doc sections is enough, yeah?
msg385946 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-01-29 21:49
New changeset 62949f697fdefbf0c8bbba7a8354b9376afa35ba by Steve Dower in branch 'master':
bpo-41282: Add deprecation warning and docs for distutils (PEP 632) (GH-24355)
https://github.com/python/cpython/commit/62949f697fdefbf0c8bbba7a8354b9376afa35ba
msg386453 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-02-03 18:59
Everyone probably noticed, but I closed all the other distutils-tagged issues (as stated in the PEP), so now this is the only one left.

Anything new that is opened that relates to distutils either needs to be a release blocker (very unlikely), or closed and directed to setuptools instead.
msg387897 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2021-03-02 02:49
New changeset 5bfa94560519bbe70ae66ff0a29498f2ae2e1937 by Inada Naoki in branch 'master':
bpo-41282: distutils: Fix stacklevel for DeprecationWarning (GH-24657)
https://github.com/python/cpython/commit/5bfa94560519bbe70ae66ff0a29498f2ae2e1937
msg388224 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2021-03-07 05:16
I have created below issues where deprecation warning is emitted due to distutils usage in tests. Probably there are other places that need an update to setuptools like setup.py used by make that emits deprecation warning during building cpython.

https://bugs.python.org/issue43426
https://bugs.python.org/issue43425

 rg '(from|import) distutils' | rg -v 'Lib/distutils|rst'
Modules/_decimal/tests/formathelper.py:from distutils.spawn import find_executable
Doc/includes/setup.py:from distutils.core import setup, Extension
Doc/includes/test.py:from distutils.util import get_platform
setup.py:from distutils import log
setup.py:from distutils.command.build_ext import build_ext
setup.py:from distutils.command.build_scripts import build_scripts
setup.py:from distutils.command.install import install
setup.py:from distutils.command.install_lib import install_lib
setup.py:from distutils.core import Extension, setup
setup.py:from distutils.errors import CCompilerError, DistutilsError
setup.py:from distutils.spawn import find_executable
Lib/_osx_support.py:        from distutils import log
Lib/_osx_support.py:    Currently called from distutils.sysconfig
Lib/test/support/__init__.py:    from distutils import ccompiler, sysconfig, spawn, errors
Lib/test/test_distutils.py:import distutils.tests
Lib/test/test_importlib/test_windows.py:from distutils.util import get_platform
Lib/test/test_peg_generator/test_c_parser.py:from distutils.tests.support import TempdirManager
Lib/test/test_sundry.py:            import distutils.bcppcompiler
Lib/test/test_sundry.py:            import distutils.ccompiler
Lib/test/test_sundry.py:            import distutils.cygwinccompiler
Lib/test/test_sundry.py:            import distutils.filelist
Lib/test/test_sundry.py:            import distutils.text_file
Lib/test/test_sundry.py:            import distutils.unixccompiler
Lib/test/test_sundry.py:            import distutils.command.bdist_dumb
Lib/test/test_sundry.py:                import distutils.command.bdist_msi
Lib/test/test_sundry.py:            import distutils.command.bdist
Lib/test/test_sundry.py:            import distutils.command.bdist_rpm
Lib/test/test_sundry.py:            import distutils.command.build_clib
Lib/test/test_sundry.py:            import distutils.command.build_ext
Lib/test/test_sundry.py:            import distutils.command.build
Lib/test/test_sundry.py:            import distutils.command.clean
Lib/test/test_sundry.py:            import distutils.command.config
Lib/test/test_sundry.py:            import distutils.command.install_data
Lib/test/test_sundry.py:            import distutils.command.install_egg_info
Lib/test/test_sundry.py:            import distutils.command.install_headers
Lib/test/test_sundry.py:            import distutils.command.install_lib
Lib/test/test_sundry.py:            import distutils.command.register
Lib/test/test_sundry.py:            import distutils.command.sdist
Lib/test/test_sundry.py:            import distutils.command.upload
Tools/peg_generator/pegen/build.py:    import distutils.log
Tools/peg_generator/pegen/build.py:    from distutils.core import Distribution, Extension
Tools/peg_generator/pegen/build.py:    from distutils.command.clean import clean  # type: ignore
Tools/peg_generator/pegen/build.py:    from distutils.command.build_ext import build_ext  # type: ignore
Tools/peg_generator/pegen/build.py:    from distutils.tests.support import fixup_build_ext  # type: ignore
Tools/c-analyzer/c_parser/preprocessor/common.py:import distutils.ccompiler
Tools/c-analyzer/c_parser/preprocessor/__init__.py:import distutils.ccompiler
Tools/test2to3/setup.py:from distutils.core import setup
Tools/test2to3/setup.py:    from distutils.command.build_py import build_py_2to3 as build_py
Tools/test2to3/setup.py:    from distutils.command.build_py import build_py
Tools/test2to3/setup.py:    from distutils.command.build_scripts import build_scripts_2to3 as build_scripts
Tools/test2to3/setup.py:    from distutils.command.build_scripts import build_scripts
Tools/test2to3/test/runtests.py:    from distutils.util import copydir_run_2to3
Misc/HISTORY:- Issue #5394: removed > 2.3 syntax from distutils.msvc9compiler.
msg391082 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-04-14 14:39
New changeset d9ba9dee7f267a603394b8d63a7697b08efdf1cb by Victor Stinner in branch 'master':
bpo-41282: setup.py ignores distutils DeprecationWarning (GH-25405)
https://github.com/python/cpython/commit/d9ba9dee7f267a603394b8d63a7697b08efdf1cb
msg391087 - (view) Author: Petr Viktorin (petr.viktorin) * (Python committer) Date: 2021-04-14 15:12
New changeset 341e8a939aca6e9f59ffb0e6daee5888933694ed by Lumír 'Frenzy' Balhar in branch 'master':
bpo-41282: (PEP 632) Load install schemes from sysconfig (GH-24549)
https://github.com/python/cpython/commit/341e8a939aca6e9f59ffb0e6daee5888933694ed
msg391175 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-04-16 09:26
New changeset 69ca32e0d34fe17dd242592b6f8754cda7bae684 by Victor Stinner in branch 'master':
bpo-41282: Fix distutils.utils.byte_compile() DeprecationWarning (GH-25406)
https://github.com/python/cpython/commit/69ca32e0d34fe17dd242592b6f8754cda7bae684
msg391683 - (view) Author: Petr Viktorin (petr.viktorin) * (Python committer) Date: 2021-04-23 12:02
New changeset 90d02e5e63e2cb8f66a2c0dd2ea8d7d4f45f4ebf by Lumír 'Frenzy' Balhar in branch 'master':
bpo-41282: (PEP 632) Deprecate distutils.sysconfig (partial implementation of the PEP) (GH-23142)
https://github.com/python/cpython/commit/90d02e5e63e2cb8f66a2c0dd2ea8d7d4f45f4ebf
msg391768 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2021-04-24 07:55
New changeset a460ab3134cd5cf3932c2125aec012851268f0cc by Christian Heimes in branch 'master':
bpo-41282: Consistent message and filter warning in setup.py (GH-25571)
https://github.com/python/cpython/commit/a460ab3134cd5cf3932c2125aec012851268f0cc
msg392322 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2021-04-29 15:46
PR 25718 was opened and linked to this ticket.  It changes sysconfig to load install schemes from a separate module, so it’s not strictly about removing distutils but adding a new system customization feature.  I think it needs its own bug and mailing-list discussion with interested parties to make sure the interface works for them.
msg392327 - (view) Author: Filipe Laíns (FFY00) * (Python triager) Date: 2021-04-29 16:20
That is reasonable. I have created bpo-43976.
msg392329 - (view) Author: Paul Moore (paul.moore) * (Python committer) Date: 2021-04-29 16:30
I'd suggest also posting it on the Packaging discourse, to get feedback from other distro maintainers.
msg392331 - (view) Author: Filipe Laíns (FFY00) * (Python triager) Date: 2021-04-29 16:48
We have discussed this approach a little in a few bug trackers, but I opened https://discuss.python.org/t/mechanism-for-distributors-to-add-site-install-schemes-to-python-installations/8467.
msg393017 - (view) Author: Ionel Cristian Mărieș (ionelmc) Date: 2021-05-05 15:52
Hello everyone, 

How are we supposed to use get_python_lib now (a function that returned the site-packages location)?

`from setuptools._distutils.sysconfig import get_python_lib` doesn't really seem like the right solution and the sysconfig stdlib module doesn't have any get_python_lib function.
msg393018 - (view) Author: Filipe Laíns (FFY00) * (Python triager) Date: 2021-05-05 15:58
I believe sysconfig.get_path('purelib') and sysconfig.get_path('platlib') should work for you.

> sysconfig.get_path('purelib')
/usr/lib/python3.9/site-packages
> sysconfig.get_path('platlib')
/usr/lib/python3.9/site-packages

(here it's the same path, but it is not guaranteed to be)
msg393020 - (view) Author: Ionel Cristian Mărieș (ionelmc) Date: 2021-05-05 16:10
That seems fine, tho for some of distros that do lots of python customizations (tried the docker ubuntu image for 18.04.3) it get a bit strange:

Python 3.6.9 (default, Jan 26 2021, 15:33:00)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sysconfig
>>> import distutils.sysconfig
>>> sysconfig.get_path('platlib')
'/usr/lib/python3.6/site-packages'
>>> sysconfig.get_path('purelib')
'/usr/lib/python3.6/site-packages'
>>> distutils.sysconfig.get_python_lib()
'/usr/lib/python3/dist-packages'
msg393021 - (view) Author: Filipe Laíns (FFY00) * (Python triager) Date: 2021-05-05 16:34
If you are relying on the value of distutils.sysconfig.get_python_lib() as you shown in your system, you probably don't want to. That directory (dist-packages) should be for Debian provided packages only, so moving to sysconfig.get_path() would be a good thing, as it has the correct value for user installed packages on your system.

But anyway, there have been introduced mechanisms that should allow distros to deal with these issues. The goal is to make it so that distros can officially customize such details and not have to rely on heavy patching.
msg393023 - (view) Author: Ionel Cristian Mărieș (ionelmc) Date: 2021-05-05 16:41
Alright so to get all the package paths, included distro-managed ones would be this right?

for scheme in sysconfig.get_scheme_names():
 for name in ['purelib', 'platlib']:
  sysconfig.get_path(name, scheme)
msg393026 - (view) Author: Filipe Laíns (FFY00) * (Python triager) Date: 2021-05-05 18:00
That always depends on the way distros patch Python, though all the major distros I know will add their schemes to sysconfig, which works what that approach. But yeah, that is what you probably want to be doing :)
msg394241 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2021-05-24 08:25
It looks like 341e8a939aca6e9f59ffb0e6daee5888933694ed (GH-24549) incorrectly deleted an important check in sysconfig that is needed for building the cpython standard library on unix-y systems. The chain of events is somewhat complicated but the problem can be easily seen by carefully examining the output of a simple build and install, like:

./configure --prefix=/tmp/testbuild
make
make install

As of 3.10.0b1, this results in the standard library module being built twice, once by the make step and once by the make install step.

GH-26237 attempts to fix the problem with minimal changes to the approach taken in GH-24549 to consolidate Lib/sysconfig.py and Lib/distutils/sysconfig.py. Frankly, I am not confident it is the best approach so it should be carefully reviewed. There probably should also be a test added at some point for this case but I will let someone else deal with that and a test should not hold up 3.10.0b2. But I think the build failure is serious enough that b2 should be held for a fix.
msg394242 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2021-05-24 08:48
Er, make that "GH-26327 attempts to fix the problem ... " but I see from the CI that it causes test_distutils to fail in the simpler case of running the test from the build directory (rather than from an installed location which does pass). I have run out of time right now but I will get back to it later today unless someone gets to it first.
msg394248 - (view) Author: Petr Viktorin (petr.viktorin) * (Python committer) Date: 2021-05-24 12:13
When building Python, we need two distinct "include" directories:
- source .h files
- install target for .h files

Note that this doesn't matter except when building Python from source.

Historically:
- source .h files were in the sysconfig scheme under 'include'
- the install directory was in the distutils.command.install scheme
    under 'headers'

GH-24549 merged these, because sysconfig is now the single source of truth and distutils is derived from it.
It seems to me that we need to bring 'headers' back -- at least when building Python.
msg394275 - (view) Author: miss-islington (miss-islington) Date: 2021-05-24 23:13
New changeset 1c454eb2e4eb9e08ee94920c0e1ca7c8896371ec by Miss Islington (bot) in branch '3.10':
bpo-41282: Fix broken `make install` (GH-26329)
https://github.com/python/cpython/commit/1c454eb2e4eb9e08ee94920c0e1ca7c8896371ec
msg394277 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2021-05-25 00:01
Petr's analysis and PR looked good and the PR is now merged to main and to 3.10 for 3.10.0b2.  Thanks, Petr! Downgrading back to normal priority.
msg394302 - (view) Author: Petr Viktorin (petr.viktorin) * (Python committer) Date: 2021-05-25 08:52
Thank you for doing the hard part, Ned!
msg403835 - (view) Author: Miro Hrončok (hroncok) * Date: 2021-10-13 14:03
Related: https://bugs.python.org/issue45460
History
Date User Action Args
2022-04-11 14:59:33adminsetgithub: 85454
2021-10-13 14:03:04hroncoksetnosy: + hroncok
messages: + msg403835
2021-05-25 08:52:47petr.viktorinsetmessages: + msg394302
2021-05-25 00:01:33ned.deilysetpriority: release blocker -> normal

messages: + msg394277
2021-05-24 23:13:39miss-islingtonsetmessages: + msg394275
2021-05-24 22:49:01miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request24928
2021-05-24 12:21:29petr.viktorinsetpull_requests: + pull_request24921
2021-05-24 12:13:08petr.viktorinsetmessages: + msg394248
2021-05-24 08:48:24ned.deilysetmessages: + msg394242
2021-05-24 08:25:46ned.deilysetpriority: normal -> release blocker

messages: + msg394241
versions: + Python 3.11
2021-05-24 07:57:18ned.deilysetpull_requests: + pull_request24919
2021-05-10 20:55:55vstinnersetnosy: - vstinner
2021-05-05 18:00:53FFY00setmessages: + msg393026
2021-05-05 16:41:00ionelmcsetmessages: + msg393023
2021-05-05 16:34:15FFY00setmessages: + msg393021
2021-05-05 16:10:10ionelmcsetmessages: + msg393020
2021-05-05 15:58:23FFY00setmessages: + msg393018
2021-05-05 15:52:41ionelmcsetnosy: + ionelmc
messages: + msg393017
2021-04-29 16:48:27FFY00setmessages: + msg392331
2021-04-29 16:30:49paul.mooresetmessages: + msg392329
2021-04-29 16:20:54FFY00setmessages: + msg392327
2021-04-29 15:46:46eric.araujosetmessages: + msg392322
2021-04-29 12:53:56FFY00setpull_requests: + pull_request24409
2021-04-24 07:55:40christian.heimessetmessages: + msg391768
2021-04-24 07:25:12christian.heimessetpull_requests: + pull_request24290
2021-04-23 12:02:47petr.viktorinsetmessages: + msg391683
2021-04-16 09:26:45vstinnersetmessages: + msg391175
2021-04-14 15:12:38petr.viktorinsetnosy: + petr.viktorin
messages: + msg391087
2021-04-14 14:39:06vstinnersetmessages: + msg391082
2021-04-14 14:06:08vstinnerlinkissue43840 superseder
2021-04-14 14:00:28vstinnersetpull_requests: + pull_request24139
2021-04-14 13:39:00vstinnersetnosy: + vstinner
pull_requests: + pull_request24138
2021-03-07 05:16:44xtreaksetnosy: + xtreak
messages: + msg388224
2021-03-02 02:49:21methanesetmessages: + msg387897
2021-02-26 04:24:15methanesetnosy: + methane
pull_requests: + pull_request23442
2021-02-16 12:57:38frenzysetpull_requests: + pull_request23332
2021-02-09 12:43:08frenzysetnosy: + frenzy
2021-02-03 18:59:10steve.dowersetmessages: + msg386453
2021-01-30 14:28:34yan12125setnosy: - yan12125
2021-01-29 21:49:01steve.dowersetmessages: + msg385946
2021-01-27 21:24:10steve.dowersetmessages: + msg385812
2021-01-27 21:20:10steve.dowersetpull_requests: + pull_request23178
2021-01-23 07:41:32Arfreversetnosy: + Arfrever
2021-01-22 17:20:43steve.dowersetkeywords: + patch
stage: patch review
pull_requests: + pull_request23122
2020-10-12 13:07:00FFY00setnosy: + FFY00
2020-09-04 17:44:26yan12125setmessages: + msg376390
2020-07-29 06:14:09hugovksetnosy: + hugovk
2020-07-18 05:23:52terry.reedysetversions: - Python 3.9
2020-07-14 18:54:46p-gansslesetmessages: + msg373653
2020-07-14 18:03:33p-gansslesetmessages: + msg373652
2020-07-14 17:28:49christian.heimessetmessages: + msg373651
2020-07-14 17:08:30steve.dowersetmessages: + msg373649
2020-07-14 10:57:31yan12125setnosy: + yan12125
2020-07-14 09:39:02dokosetmessages: + msg373633
2020-07-14 09:15:58christian.heimessetnosy: + christian.heimes
messages: + msg373631
2020-07-14 08:59:47dokosetmessages: + msg373630
2020-07-14 08:48:03dokosetnosy: + doko
messages: + msg373629
2020-07-14 00:15:28brett.cannonsetmessages: + msg373622
2020-07-13 17:43:52xtreaksetnosy: + p-ganssle
2020-07-13 16:54:44dstufftsetmessages: + msg373615
2020-07-13 16:52:31steve.dowersetnosy: - p-ganssle
messages: + msg373614
2020-07-13 16:50:52p-gansslesetnosy: + p-ganssle
messages: + msg373613
2020-07-13 16:43:11lukasz.langasetmessages: + msg373612
2020-07-13 07:29:37ned.deilysetnosy: + brett.cannon
2020-07-13 07:28:23ned.deilysetnosy: + ned.deily, pablogsal
messages: + msg373586
2020-07-12 08:50:51jaracosetnosy: + steve.dower
2020-07-12 08:34:02jaracosetnosy: + paul.moore, ncoghlan
2020-07-12 08:33:17jaracosetnosy: + lukasz.langa
messages: + msg373549
2020-07-12 08:30:25jaracocreate