Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at

Bug 1948439

Summary: python-calcephpy fails to build with Python 3.10: configure: error: cannot import Python module "distutils".
Product: [Fedora] Fedora Reporter: Tomáš Hrnčiar <thrnciar>
Component: python-calcephpyAssignee: Mattia Verga <mattia.verga>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: astro-sig, mattia.verga, mhroncok, pviktori, thrnciar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: python-calcephpy-3.4.7-4.fc35 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-18 08:20:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1890881    

Description Tomáš Hrnčiar 2021-04-12 07:42:50 UTC
python-calcephpy fails to build with Python 3.10.0a7.

configure: error: cannot import Python module "distutils".
Please check your Python installation. The error was:
<string>:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives

bpo-41282: Deprecate distutils in documentation and add warning on import.

For the build logs, see:

For all our attempts to build python-calcephpy with Python 3.10, see:

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.10:

Let us know here if you have any questions.

Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10.
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.

Comment 1 Miro Hrončok 2021-04-12 16:04:21 UTC
config/ax_python_devel.m4 is outdated, it needs to contain this fix from 2017:;a=commit;h=883a2abd5a and configure needs to be regenerated

Comment 2 Mattia Verga 2021-04-13 06:37:11 UTC
I tried to apply the patch pointed out by Miro, but I get the same error.

I do not understand: why a deprecation warning prevents distutils package from being imported? Does Python 3.10 removes distutils or not?

Comment 3 Petr Viktorin (pviktori) 2021-04-14 11:34:40 UTC
Did you regenerate configure?

> I do not understand: why a deprecation warning prevents distutils package from being imported? Does Python 3.10 removes distutils or not?

Distutils is stuill usable in 3.10. But without the patch, autoconf essentially treats warnings as errors.

Comment 4 Mattia Verga 2021-04-14 16:05:35 UTC
(In reply to Petr Viktorin from comment #3)
> Did you regenerate configure?

I tried with 'autoreconf -fvi', but it fails because there's no in sources.

Comment 5 Mattia Verga 2021-04-18 08:17:33 UTC
Upstream maintainer has provided me some modified sources, so a patched version of python-calcephpy is now building in Rawhide.

Comment 6 Fedora Update System 2021-04-18 08:20:12 UTC
FEDORA-2021-32e91fcaa8 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.