Fix compilation failure due to python-setuptools update to 66.0.0

This commit is contained in:
starlet-dx 2023-05-08 08:57:53 +08:00
parent 1aa73f2cee
commit 5a8f207425

View File

@ -1,11 +1,10 @@
%global py3_incdir %(python3 -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_inc())') %global py3_incdir %(python3 -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_inc())')
%global py3_libbuilddir %(python3 -c 'import sys; import sysconfig; print("lib.{p}-{v[0]}.{v[1]}".format(p=sysconfig.get_platform(), v=sys.version_info))')
%global with_docs 0 %global with_docs 0
Name: python-pillow Name: python-pillow
Version: 9.5.0 Version: 9.5.0
Release: 1 Release: 2
Summary: Python image processing library Summary: Python image processing library
License: MIT License: MIT
URL: http://python-pillow.github.io/ URL: http://python-pillow.github.io/
@ -95,7 +94,7 @@ Qt pillow image wrapper.
%py3_build %py3_build
%if 0%{?with_docs} %if 0%{?with_docs}
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
@ -105,10 +104,10 @@ install -m 644 src/libImaging/*.h %{buildroot}/%{py3_incdir}/Imaging
%py3_install %py3_install
%check %check
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
export PYTHONPATH=%{buildroot}%{python3_sitearch} export PYTHONPATH=%{buildroot}%{python3_sitearch}
@ -147,6 +146,9 @@ pytest --ignore=_build.python2 --ignore=_build.python3 --ignore=_build.pypy3 -v
%{python3_sitearch}/PIL/__pycache__/ImageQt* %{python3_sitearch}/PIL/__pycache__/ImageQt*
%changelog %changelog
* Mon May 08 2023 yaoxin <yao_xin001@hoperun.com> - 9.5.0-2
- Fix compilation failure due to python-setuptools update to 66.0.0
* Mon Apr 10 2023 yaoxin <yao_xin001@hoperun.com> - 9.5.0-1 * Mon Apr 10 2023 yaoxin <yao_xin001@hoperun.com> - 9.5.0-1
- Update to 9.5.0 - Update to 9.5.0