From 949f9b81706861de15b63f14ee70447144c88912 Mon Sep 17 00:00:00 2001 From: Jan Beran Date: Mar 19 2018 09:20:14 +0000 Subject: Fix of missing Python 3 executables (rhbz #1432570) Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1432570 --- diff --git a/python-rosdep.spec b/python-rosdep.spec index 5454879..863bae0 100644 --- a/python-rosdep.spec +++ b/python-rosdep.spec @@ -11,7 +11,7 @@ Name: python-%{realname} Version: 0.11.4 -Release: 10%{?dist} +Release: 11%{?dist} Summary: ROS System Dependency Installer License: BSD @@ -110,14 +110,6 @@ popd %install rm -rf $RPM_BUILD_ROOT -%if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py install --force --skip-build --root $RPM_BUILD_ROOT -popd - -sed -i 's|#!/usr/bin/env python||' $RPM_BUILD_ROOT%{python3_sitelib}/%{realname}2/*.py -sed -i 's|#!/usr/bin/env python||' $RPM_BUILD_ROOT%{python3_sitelib}/%{realname}2/*.py -%endif # with_python3 %{__python2} setup.py install --force --skip-build --root $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 @@ -129,6 +121,15 @@ touch $RPM_BUILD_ROOT%{_sysconfdir}/ros/rosdep/sources.list.d/20-default.list sed -i 's|#!/usr/bin/env python||' $RPM_BUILD_ROOT%{python2_sitelib}/%{realname}2/*.py sed -i 's|#!/usr/bin/env python||' $RPM_BUILD_ROOT%{python2_sitelib}/%{realname}2/platforms/*.py +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py install --force --skip-build --root $RPM_BUILD_ROOT +popd + +sed -i 's|#!/usr/bin/env python||' $RPM_BUILD_ROOT%{python3_sitelib}/%{realname}2/*.py +sed -i 's|#!/usr/bin/env python||' $RPM_BUILD_ROOT%{python3_sitelib}/%{realname}2/*.py +%endif # with_python3 + # Get rid of hidden file in documentation folder rm -f doc/_build/.buildinfo @@ -141,7 +142,9 @@ rm -f doc/_build/.buildinfo %files -n python2-%{realname} %license LICENSE %doc README.md doc/_build/html +%if !0%{?with_python3} %{_bindir}/* +%endif %{python2_sitelib}/%{realname}-%{version}-py?.?.egg-info %{python2_sitelib}/%{realname}2 %{_mandir}/man1/*.gz @@ -152,11 +155,15 @@ rm -f doc/_build/.buildinfo %if 0%{?with_python3} %files -n python3-%{realname} %license LICENSE +%{_bindir}/* %{python3_sitelib}/%{realname}-%{version}-py?.?.egg-info %{python3_sitelib}/%{realname}2 %endif %changelog +* Mon Mar 19 2018 Jan Beran - 0.11.4-11 +- Fix of missing Python 3 executables (rhbz #1432570) + * Fri Feb 09 2018 Iryna Shcherbina - 0.11.4-10 - Update Python 2 dependency declarations to new packaging standards (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)