pipx fails to build with Python 3.12.0a5. Traceback (most recent call last): File "/usr/lib/python3.12/site-packages/build_manpages/compat.py", line 8, in <module> from setuptools import Command ModuleNotFoundError: No module named 'setuptools' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3.12/site-packages/build_manpages/compat.py", line 13, in <module> from distutils.core import Command ModuleNotFoundError: No module named 'distutils' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/builddir/build/BUILD/pipx-1.1.0/scripts/generate_man.py", line 7, in <module> from build_manpages.manpage import Manpage # type: ignore ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/build_manpages/__init__.py", line 6, in <module> from .build_manpages import build_manpages, get_build_py_cmd, get_install_cmd File "/usr/lib/python3.12/site-packages/build_manpages/build_manpages.py", line 17, in <module> from .compat import ( File "/usr/lib/python3.12/site-packages/build_manpages/compat.py", line 17, in <module> raise ImportError( ImportError: To use the 'build_manpages' tool on Python 3.12+, you need to install 'setuptools'. Remove the distutils package. It was deprecated in Python 3.10 by PEP 632 “Deprecate distutils module”. For projects still using distutils and cannot be updated to something else, the setuptools project can be installed: it still provides distutils. (Contributed by Victor Stinner in gh-92584.) If your package is listed in [0], you may workaround this issue by BuildRequiring python-setuptools, note that adding such BuildRequires might however hide some transitive dependency problem, if the distutils import comes from a dependency. Cooperation with upstream is recommended. Additional context [1]. [0] https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org/message/6BHNAWHE7M5VY3YQVJLOYHLY4M7KIFFN/ [1] https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org/thread/N6ITYHLRWIDNYNXGPYG2ZHF3ZLQWZN7L/ https://docs.python.org/3.12/whatsnew/3.12.html For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.12/fedora-rawhide-x86_64/05583016-pipx/ For all our attempts to build pipx with Python 3.12, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.12/package/pipx/ Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.12: https://copr.fedorainfracloud.org/coprs/g/python/python3.12/ Let us know here if you have any questions. Python 3.12 is planned to be included in Fedora 39. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.12. A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon. We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.
This is a problem in python3-argparse-manpage which owns /usr/lib/python3.12/site-packages/build_manpages/compat.py We've discussed this in https://github.com/praiskup/argparse-manpage/issues/63
I am still not sure if I entirely agree with treating the setuptools dependency in argparse-manpage as an “extra,” because I am not sure what functionality is available when it is not present. However, given that the “setuptools” extra *was* added, I plan to fix this for pipx as follows. Note the link to https://github.com/pypa/pipx/pull/943, where I asked pipx upstream to add the “setuptools” extra dependency to their noxfile.py. There’s no need to apply that patch in the Fedora package since it doesn’t use nox. From 02d453854fcee7584088c5c71f201d323216794d Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" <code> Date: Fri, 3 Mar 2023 12:31:54 -0500 Subject: [PATCH] Depend on argparse-manpage with setuptools extra (fix RHBZ#2175193) --- pipx.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pipx.spec b/pipx.spec index 4811ff1..e1d5501 100644 --- a/pipx.spec +++ b/pipx.spec @@ -13,7 +13,9 @@ BuildArch: noarch BuildRequires: python3-devel # noxfile.py: MAN_DEPENDENCIES -BuildRequires: python3dist(argparse-manpage) +# See: “Fix argparse-manpage dependency for Python 3.12+” +# https://github.com/pypa/pipx/pull/943 +BuildRequires: python3dist(argparse-manpage[setuptools]) BuildRequires: /usr/bin/register-python-argcomplete -- 2.39.2
FEDORA-2023-ac78b77bab has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-ac78b77bab
FEDORA-2023-ac78b77bab has been pushed to the Fedora 39 stable repository. If problem still persists, please make note of it in this bug report.