python-cvxopt fails to build with Python 3.11.0a2. Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module> main() ^^^^^^ File "/usr/lib/python3.11/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main json_out['return_val'] = hook(**hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 164, in prepare_metadata_for_build_wheel return hook(metadata_directory, config_settings) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/setuptools/build_meta.py", line 166, in prepare_metadata_for_build_wheel self.run_setup() ^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/setuptools/build_meta.py", line 259, in run_setup self).run_setup(setup_script=setup_script) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/setuptools/build_meta.py", line 150, in run_setup exec(compile(code, __file__, 'exec'), locals()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "setup.py", line 261, in <module> version=versioneer.get_version(), ^^^^^^^^^^^^^^^^^^^^^^^^ File "/builddir/build/BUILD/cvxopt-1.2.7/versioneer.py", line 1473, in get_version return get_versions()["version"] ^^^^^^^^^^^^^^ File "/builddir/build/BUILD/cvxopt-1.2.7/versioneer.py", line 1406, in get_versions cfg = get_config_from_root(root) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/builddir/build/BUILD/cvxopt-1.2.7/versioneer.py", line 412, in get_config_from_root parser = configparser.SafeConfigParser() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'? Removed from the configparser module: the SafeConfigParser class, the filename property of the ParsingError class, the readfp() method of the ConfigParser class, deprecated since Python 3.2. (Contributed by Hugo van Kemenade in bpo-45173.) https://bugs.python.org/issue45173 https://docs.python.org/3.11/whatsnew/3.11.html For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.11/fedora-rawhide-x86_64/02939758-python-cvxopt/ For all our attempts to build python-cvxopt with Python 3.11, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.11/package/python-cvxopt/ 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.11: https://copr.fedorainfracloud.org/coprs/g/python/python3.11/ Let us know here if you have any questions. Python 3.11 is planned to be included in Fedora 37. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.11. 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.
I tried yesterday and today both to build a possible fix for this with mock. I followed the instructions on how to create a mock configuration file for python 3.11. On both days, this is what happens: $ mock -r fedora-rawhide-python311 --enablerepo=local --rebuild python-cvxopt-1.2.7-2.fc36.src.rpm [snip lots of normal output] INFO: Mock Version: 2.14 Start: dnf install Traceback (most recent call last): File "/usr/bin/dnf", line 57, in <module> from dnf.cli import main File "/usr/lib/python3.10/site-packages/dnf/__init__.py", line 30, in <module> import dnf.base File "/usr/lib/python3.10/site-packages/dnf/base.py", line 32, in <module> from dnf.comps import CompsQuery File "/usr/lib/python3.10/site-packages/dnf/comps.py", line 27, in <module> from dnf.exceptions import CompsError File "/usr/lib/python3.10/site-packages/dnf/exceptions.py", line 22, in <module> import dnf.util File "/usr/lib/python3.10/site-packages/dnf/util.py", line 29, in <module> import dnf.callback File "/usr/lib/python3.10/site-packages/dnf/callback.py", line 22, in <module> import dnf.yum.rpmtrans File "/usr/lib/python3.10/site-packages/dnf/yum/rpmtrans.py", line 26, in <module> import rpm ModuleNotFoundError: No module named 'rpm' ERROR: Exception(python-cvxopt-1.2.7-1.fc36.src.rpm) Config(fedora-rawhide-python311) 1 minutes 36 seconds Do you have any idea what is going on here?
Try to use --no-bootstrap-chroot option. From the python3.11 instructions: Build using mock -r fedora-rawhide-python311 --enablerepo=local. Until dnf is built here, you'll need to disable bootstrap with --no-bootstrap-chroot.
Thank you, Tomáš. I did indeed overlook that part. It appears that cvxopt itself is fine. The problem lies with versioneer.py. I have filed an upstream bug about the issue: https://github.com/cvxopt/cvxopt/issues/203 For the time being, I have patched versioneer.py to version 0.21 and did a build for Rawhide.