From 52568d23f461e3195c20178efe8f1a17cc6d2b86 Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Thu, 23 Jun 2022 01:32:01 +0200 Subject: [PATCH] Fix FTBFS with setuptools >= 62.1 Resolves: rhbz#2097095 --- python-pillow.spec | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/python-pillow.spec b/python-pillow.spec index 5fa766b..2c6c7c9 100644 --- a/python-pillow.spec +++ b/python-pillow.spec @@ -1,5 +1,4 @@ %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 # EPEL9 is missing some dependencies to build the documentation @@ -13,7 +12,7 @@ Name: python-%{srcname} Version: 9.1.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python image processing library # License: see http://www.pythonware.com/products/pil/license.htm @@ -202,7 +201,7 @@ PKG_CONFIG=mingw64-pkg-config %{mingw64_py3_build} # Doc build %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 %endif @@ -237,10 +236,10 @@ rm -rf %{buildroot}%{mingw64_bindir} %check # Check Python 3 modules -ln -s $PWD/Images $PWD/build/%py3_libbuilddir/Images -cp -R $PWD/Tests $PWD/build/%py3_libbuilddir/Tests -cp -a $PWD/selftest.py $PWD/build/%py3_libbuilddir/selftest.py -pushd build/%py3_libbuilddir +ln -s $PWD/Images $(echo $PWD/build/lib.linux-*)/Images +cp -R $PWD/Tests $(echo $PWD/build/lib.linux-*)/Tests +cp -a $PWD/selftest.py $(echo $PWD/build/lib.linux-*)/selftest.py +pushd build/lib.linux-* PYTHONPATH=$PWD %{__python3} selftest.py popd %ifnarch s390x @@ -299,6 +298,10 @@ popd %changelog +* Wed Jun 22 2022 Charalampos Stratakis - 9.1.1-4 +- Fix FTBFS with setuptools >= 62.1 +Resolves: rhbz#2097095 + * Mon Jun 13 2022 Python Maint - 9.1.1-3 - Rebuilt for Python 3.11