The setup.py install command tries to import distutils
but the distutils-precedence.pth file is not yet respected
and Python 3.12+ no longer has distutils in the standard library.
The error was:
Executing(%install): ...
...
+ /usr/bin/python3 setup.py install -O1 --skip-build --root /builddir/build/BUILDROOT/python-setuptools-65.5.1-3.fc39~bootstrap.x86_64 --prefix /usr
running install
...
writing byte-compilation script '/tmp/tmpuud06dfj.py'
/usr/bin/python3 /tmp/tmpuud06dfj.py
Traceback (most recent call last):
File "/tmp/tmpuud06dfj.py", line 1, in <module>
from distutils.util import byte_compile
ModuleNotFoundError: No module named 'distutils'
error: command '/usr/bin/python3' failed with exit code 1
The initial build for new Python version does not yet have the script available.
Multiple input files for the script are supported since Fedora 35,
but we keep the versioned BuildRequires for RHEL's sake.
The $PWD makes no sense --without bootstrap and the script should not even import pkg_resources,
see https://src.fedoraproject.org/rpms/python-rpm-generators/pull-request/59
It is obvious to me now that this is not going to be removed,
but will be reused for RHEL 10, 11, etc.
The new %bcond syntax is nicer.
Some checks can run even --without tests, do it.
The `du` tool estimates disk usage, so filesystem settings
(block size, compression, holes, etc.) might change the result.
Use `stat` instead for a more reproducible result.
Note that I've changed 900 (KiB) to 900000 (bytes) which is in fact not correct
(900 KiB is 921600 bytes),
but I assumed a human-readable round number works better here.
I've updated the comment to say kB instead of KiB.
Fixes https://bugzilla.redhat.com/2143393
Anecdata: at least three of the python-maint team members got stuck on "why do
we have the same line twice there" when they read the spec for the first time
- change license string
- change wheel size test to 800 KiB (there are more bundled libraries)
- backport upstream patches to run more tests without the internet
connection