https://bugzilla.redhat.com/show_bug.cgi?id=1667725
--- Comment #13 from Jonathan Wakely <jwakely(a)redhat.com> ---
This part can also be simplified:
%build
# Dump the versions being used into the build logs.
%if %{with python2}
%global python2_version %(/usr/bin/python2 %{SOURCE2})
: PYTHON2_VERSION=%{python2_version}
%endif
%if %{with python3}
%global python3_version %(/usr/bin/python3 %{SOURCE2})
%global python3_abiflags %(/usr/bin/python3-config --abiflags)
: PYTHON3_VERSION=%{python3_version}
: PYTHON3_ABIFLAGS=%{python3_abiflags}
%endif
For Fedora we just rely on %{python2_version} and %{python3_version} being
defined:
%build
# Dump the versions being used into the build logs.
%if %{with python2}
: PYTHON2_VERSION=%{python2_version}
%endif
%if %{with python3}
PYTHON3_ABIFLAGS=$(/usr/bin/python3-config --abiflags)
: PYTHON3_VERSION=%{python3_version}
: PYTHON3_ABIFLAGS=${PYTHON3_ABIFLAGS}
%endif
But even if EPEL doesn't automatically have %{python2_version} and
%{python3_version}, the ver.py script can still be replaced:
%global python2_version %(/usr/bin/python2 -c 'import platform;
print(".".join
(platform.python_version_tuple ()[:2]))')
And similarly for python3.
That would get rid of the warnings produced by rpmlint etc:
/usr/bin/python2: can't open file '/home/jwakely/rpmbuild/SOURCES/ver.py':
[Errno 2] No such file or directory
--
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component