From 519e7eee12063c1aeb4688fff9ad487448aa3aaa Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Mar 16 2022 15:34:49 +0000 Subject: Explicitly declare the usage of distutils from Python stdlib for tests setuptools 60+ bundles distutils which then have an impact on the test environment, causing test_with_pip to fail. Resolves: https://bugzilla.redhat.com/2064734 --- diff --git a/python3.9.spec b/python3.9.spec index 583605b..3ceb277 100644 --- a/python3.9.spec +++ b/python3.9.spec @@ -17,7 +17,7 @@ URL: https://www.python.org/ #global prerel ... %global upstream_version %{general_version}%{?prerel} Version: %{general_version}%{?prerel:~%{prerel}} -Release: 2%{?dist} +Release: 3%{?dist} License: Python @@ -1198,6 +1198,11 @@ done %check +# setuptools 60+ uses its own copy of distutils by default +# this setting must be overriden with the environment variable for +# Python tests to use the standard library's distutils +export SETUPTOOLS_USE_DISTUTILS=stdlib + # first of all, check timestamps of bytecode files find %{buildroot} -type f -a -name "*.py" -print0 | \ LD_LIBRARY_PATH="%{buildroot}%{dynload_dir}/:%{buildroot}%{_libdir}" \ @@ -1800,6 +1805,10 @@ CheckPython optimized # ====================================================== %changelog +* Wed Mar 16 2022 Karolina Surma - 3.9.10-3 +- Fix the test suite support for setuptools >= 60 +Resolves: rhbz#2064734 + * Fri Jan 21 2022 Fedora Release Engineering - 3.9.10-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild