From 90858ae8e9383ca53b6fea02cff2cb3c6a913563 Mon Sep 17 00:00:00 2001 From: Scott K Logan Date: Oct 03 2019 21:05:43 +0000 Subject: Drop unversioned python exe dependency --- diff --git a/python-rospkg.spec b/python-rospkg.spec index 9337dd3..eb2e5db 100644 --- a/python-rospkg.spec +++ b/python-rospkg.spec @@ -1,4 +1,4 @@ -%{?!_without_python2:%global with_python2 0%{?_with_python2:1} || !(0%{?rhel} >= 8)} +%{?!_without_python2:%global with_python2 0%{?_with_python2:1} || !(0%{?fedora} >= 32 || 0%{?rhel} >= 8)} %{?!_without_python3:%global with_python3 0%{?_with_python3:1} || !0%{?rhel} || 0%{?rhel} >= 7} %global srcname rospkg @@ -34,7 +34,6 @@ HTML documentation for the '%{srcname}' Python module. %if 0%{?with_python2} %package -n python2-%{srcname} Summary: %{summary} -BuildRequires: /usr/bin/python BuildRequires: python2-catkin_pkg BuildRequires: python2-devel BuildRequires: python2-mock @@ -63,7 +62,6 @@ release your code for others to use. %if 0%{?with_python3} %package -n python%{python3_pkgversion}-%{srcname} Summary: %{summary} -BuildRequires: /usr/bin/python BuildRequires: python%{python3_pkgversion}-catkin_pkg BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-mock @@ -92,6 +90,10 @@ release your code for others to use. %prep %autosetup -p1 -n %{srcname}-%{version} +%if !(0%{?with_python2}) +find test -type f | xargs sed -i '1{s@^#!/usr/bin/env python@#!%{__python3}@}' +%endif # !with_python2 + %build %if 0%{?with_python2}