Python 3.12 removes distutils. In setup.py, we import setuptools but fall back to distutils, which is fine. But in lib/portage/tests/runTests.py, we unconditionally import it which falls flat w/ 3.12: ``` $ python3.12 /usr/lib/python3.10/site-packages/portage/tests/runTests.py Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/portage/tests/runTests.py", line 14, in <module> from distutils.dir_util import copy_tree ModuleNotFoundError: No module named 'distutils' ```
ommit ad3994394af0bc975ec7c28bd60de496b580c25e Author: James Le Cuirot <chewi@gentoo.org> Date: Sat Jul 15 12:20:27 2023 +0100 Migrate from setuptools to Meson and meson-python This makes Portage PEP 517 compliant. When building via meson-python, the man pages and logrotate config are no longer included as there seems little point. Bug: https://bugs.gentoo.org/910035 Signed-off-by: James Le Cuirot <chewi@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org> commit f3b90592994c418286b10d883b4aee9a104f5e75 Author: James Le Cuirot <chewi@gentoo.org> Date: Fri Jul 21 21:36:31 2023 +0100 Drop custom test runner bits in favour of pytest Signed-off-by: James Le Cuirot <chewi@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85ba2adbcb631fc6a5399fd89cb4a03ffcc00236 commit 85ba2adbcb631fc6a5399fd89cb4a03ffcc00236 Author: Sam James <sam@gentoo.org> AuthorDate: 2024-06-14 04:03:54 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-06-14 04:04:54 +0000 sys-apps/portage: depend on >=dev-build/meson-1.3.0-r1 in live No need for the || ( ... ) dance now and it lets us drop the setuptools dep as >=1.3.0 doesn't use distutils, but sysconfig. Noticed when looking at bug #906991 which I'd forgot about. Bug: https://bugs.gentoo.org/906991 Signed-off-by: Sam James <sam@gentoo.org> sys-apps/portage/portage-9999.ebuild | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-)