Avoid using distutils in RPM macros, use existing macros where possible

Distutils are deprecated https://www.python.org/dev/peps/pep-0632/
This commit is contained in:
Miro Hrončok 2022-01-28 01:15:57 +01:00 committed by smani
parent e3e5ca0412
commit 883fd25bdf

View File

@ -1,5 +1,5 @@
%global py3_incdir %(python3 -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_inc())') %global py3_incdir %(RPM_BUILD_ROOT= %{python3} -Ic 'import sysconfig; print(sysconfig.get_path("include"))')
%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 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