Bug 2135758 - gpgme fails to build without distutils
Summary: gpgme fails to build without distutils
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gpgme
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jiri Kucera
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.12
TreeView+ depends on / blocked
 
Reported: 2022-10-18 11:25 UTC by Miro Hrončok
Modified: 2022-12-01 01:08 UTC (History)
3 users (show)

Fixed In Version: gpgme-1.17.1-2.fc38
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-12-01 01:08:09 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2022-10-18 11:25:13 UTC
Description of problem:
The Python standard library distutils module will be removed from Python 3.12+

https://peps.python.org/pep-0632/

As preparatory work, we build all python packages in a Copr repository with Python 3.11 sans distutils.

https://copr.fedorainfracloud.org/coprs/g/python/python-without-distutils/

gpgme fails to build:

https://copr.fedorainfracloud.org/coprs/g/python/python-without-distutils/package/gpgme/

...
checking for python3.1... (cached) /usr/bin/python3.11
checking for a version of Python >= '2.1.0'... yes
checking for the distutils Python package... no
configure: error: cannot import Python module "distutils".
Please check your Python installation. The error was:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'distutils'
error: Bad exit status from /var/tmp/rpm-tmp.CV2Ket (%build)
    Bad exit status from /var/tmp/rpm-tmp.CV2Ket (%build)


Version-Release number of selected component: 1.17.0-4


How reproducible: Build gpgme without distutils


Steps to Reproduce:
1. fedpkg clone gpgme && cd gpgme
2. mock -r fedora-rawhide-x86_64 init
3. mock -r fedora-rawhide-x86_64 install python3-devel
4. sudo rm -rf /var/lib/mock/fedora-rawhide-x86_64/root/usr/lib64/python3.11/distutils/
4. fedpkg mockbuild -N


Actual results: fails to build
Expected results: builds fine

The python3-setutpools package provides a distutils module, so sometimes "simply" adding BuildRequires: python3-setuptools might workaround the problem. Unfortunately,  is not 100 % compatible with the removed standard library one distutils: https://github.com/pypa/setuptools/issues/3532

Comment 1 Fedora Update System 2022-12-01 01:02:21 UTC
FEDORA-2022-4c1b011b1b has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2022-4c1b011b1b

Comment 2 Fedora Update System 2022-12-01 01:08:09 UTC
FEDORA-2022-4c1b011b1b has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.