Fix FTBFS with setuptools >= 62.1

Resolves: rhbz#2097095
This commit is contained in:
Charalampos Stratakis 2022-06-23 01:32:01 +02:00
parent 49292102f0
commit 52568d23f4

View File

@ -1,5 +1,4 @@
%global py3_incdir %(RPM_BUILD_ROOT= %{python3} -Ic 'import sysconfig; print(sysconfig.get_path("include"))') %global py3_incdir %(RPM_BUILD_ROOT= %{python3} -Ic 'import sysconfig; print(sysconfig.get_path("include"))')
%global py3_libbuilddir lib.%{python3_platform}-%{python3_version}
%global srcname pillow %global srcname pillow
# EPEL9 is missing some dependencies to build the documentation # EPEL9 is missing some dependencies to build the documentation
@ -13,7 +12,7 @@
Name: python-%{srcname} Name: python-%{srcname}
Version: 9.1.1 Version: 9.1.1
Release: 3%{?dist} Release: 4%{?dist}
Summary: Python image processing library Summary: Python image processing library
# License: see http://www.pythonware.com/products/pil/license.htm # License: see http://www.pythonware.com/products/pil/license.htm
@ -202,7 +201,7 @@ PKG_CONFIG=mingw64-pkg-config %{mingw64_py3_build}
# Doc build # Doc build
%if %{with doc} %if %{with doc}
PYTHONPATH=$PWD/build/%py3_libbuilddir make -C docs html BUILDDIR=_build_py3 SPHINXBUILD=sphinx-build-%python3_version PYTHONPATH=$(echo $PWD/build/lib.linux-*) make -C docs html BUILDDIR=_build_py3 SPHINXBUILD=sphinx-build-%python3_version
rm -f docs/_build_py3/html/.buildinfo rm -f docs/_build_py3/html/.buildinfo
%endif %endif
@ -237,10 +236,10 @@ rm -rf %{buildroot}%{mingw64_bindir}
%check %check
# Check Python 3 modules # Check Python 3 modules
ln -s $PWD/Images $PWD/build/%py3_libbuilddir/Images ln -s $PWD/Images $(echo $PWD/build/lib.linux-*)/Images
cp -R $PWD/Tests $PWD/build/%py3_libbuilddir/Tests cp -R $PWD/Tests $(echo $PWD/build/lib.linux-*)/Tests
cp -a $PWD/selftest.py $PWD/build/%py3_libbuilddir/selftest.py cp -a $PWD/selftest.py $(echo $PWD/build/lib.linux-*)/selftest.py
pushd build/%py3_libbuilddir pushd build/lib.linux-*
PYTHONPATH=$PWD %{__python3} selftest.py PYTHONPATH=$PWD %{__python3} selftest.py
popd popd
%ifnarch s390x %ifnarch s390x
@ -299,6 +298,10 @@ popd
%changelog %changelog
* Wed Jun 22 2022 Charalampos Stratakis <cstratak@redhat.com> - 9.1.1-4
- Fix FTBFS with setuptools >= 62.1
Resolves: rhbz#2097095
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 9.1.1-3 * Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 9.1.1-3
- Rebuilt for Python 3.11 - Rebuilt for Python 3.11