Skip to content

Commit fd3dbb0

Browse files
committed
python: mention that SETUPTOOLS_USE_DISTUTILS=stdlib will error with 3.12
The news wrongly stated that it has no effect, but setuptools just fails without any explanation starting with 3.12 as it will still try to import distutils from the stdlib.
1 parent 437363c commit fd3dbb0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

web/docs/python.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,6 @@ if os.name == "nt" and sysconfig.get_platform().startswith("mingw"):
3131

3232
### Changelog
3333

34+
* 2024-11-09: With the update to Python 3.12, the environment variable setting `SETUPTOOLS_USE_DISTUTILS=stdlib` will cause distutils import errors because the standard library's distutils module has been removed. If you're still using this workaround, remove the environment variable.
3435
* 2024-07-01: [setuptools](https://github.com/pypa/setuptools) now supports building C extensions in MSYS2 since [v70.2.0](https://github.com/pypa/setuptools/releases/tag/v70.2.0). Previous versions required `export SETUPTOOLS_USE_DISTUTILS=stdlib` as a workaround.
3536
* 2023-08-22: The mingw Python now provides the limited ABI DLL (libpython3.dll). Support in upstream setuptools is still missing though.

web/news.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ There are some minor things to watch out for with this update:
3131
* While not MSYS2 specific, 3.12 is the version that [dropped the included
3232
distutils package](https://peps.python.org/pep-0632) and distutils is now only
3333
available as part of setuptools. While the current setuptools should handle
34-
our Python out of the box, there may be slight differences. This also means
35-
that SETUPTOOLS_USE_DISTUTILS=stdlib no longer has any effect.
34+
our Python out of the box, there may be slight differences. Make sure to
35+
remove anything setting `SETUPTOOLS_USE_DISTUTILS=stdlib` as that will lead to
36+
distutils import errors.
3637
* As with every major Python update we had to drop a few packages that were
3738
incompatible with the new version and for which no update or patch was
3839
available. One notable package there is py2exe which does not support 3.12+

0 commit comments

Comments
 (0)