Use versioned pathfixX.Y.py script

so pyproject-rpm-macros can depend on any pythonX.Y-devel package
This commit is contained in:
Lumir Balhar 2020-07-21 14:31:41 +02:00
parent 99d9596d7c
commit 64e45518ef

View File

@ -26,7 +26,7 @@ specifier=$(ls %{_pyproject_wheeldir}/*.whl | xargs basename --multiple | sed -E
export TMPDIR="${PWD}/%{_pyproject_builddir}" export TMPDIR="${PWD}/%{_pyproject_builddir}"
%{__python3} -m pip install --root %{buildroot} --no-deps --disable-pip-version-check --progress-bar off --verbose --ignore-installed --no-warn-script-location --no-index --no-cache-dir --find-links %{_pyproject_wheeldir} $specifier %{__python3} -m pip install --root %{buildroot} --no-deps --disable-pip-version-check --progress-bar off --verbose --ignore-installed --no-warn-script-location --no-index --no-cache-dir --find-links %{_pyproject_wheeldir} $specifier
if [ -d %{buildroot}%{_bindir} ]; then if [ -d %{buildroot}%{_bindir} ]; then
pathfix.py -pni "%{__python3}" -k%{?py3_shbang_opts: -a%{py3_shbang_opts_nodash}} %{buildroot}%{_bindir}/* pathfix%{python3_version}.py -pni "%{__python3}" -k%{?py3_shbang_opts: -a%{py3_shbang_opts_nodash}} %{buildroot}%{_bindir}/*
rm -rfv %{buildroot}%{_bindir}/__pycache__ rm -rfv %{buildroot}%{_bindir}/__pycache__
fi fi
rm -f %{pyproject_ghost_distinfo} rm -f %{pyproject_ghost_distinfo}