From 801394e35e797823ca7f2bec687a8e441e900bb1 Mon Sep 17 00:00:00 2001 From: aries Date: Aug 29 2017 14:30:10 +0000 Subject: [PATCH 1/3] Fix of missing Python 3 executables Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1432565 --- diff --git a/python-rosinstall.spec b/python-rosinstall.spec index 33b6363..a44fe0f 100644 --- a/python-rosinstall.spec +++ b/python-rosinstall.spec @@ -10,7 +10,7 @@ %global realname rosinstall Name: python-rosinstall Version: 0.7.7 -Release: 8%{?dist} +Release: 9%{?dist} Summary: ROS installation utilities License: BSD @@ -105,6 +105,10 @@ popd %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py install --force --skip-build --root $RPM_BUILD_ROOT +# Rename Python 3 executables +for file in %{buildroot}/%{_bindir}/*; do + mv $file $file-3 +done popd %endif @@ -124,7 +128,7 @@ rm -rf doc/_build/html/.buildinfo %files -n python2-%{realname} %license LICENSE %doc doc/_build/html README.rst -%{_bindir}/* +%{_bindir}/*[!'-3'] %{python2_sitelib}/%{realname} %{python2_sitelib}/%{realname}-%{version}-py?.?.egg-info %{_mandir}/man1/%{realname}.1.gz @@ -132,11 +136,15 @@ rm -rf doc/_build/html/.buildinfo %if 0%{?with_python3} %files -n python3-%{realname} %license LICENSE +%{_bindir}/*-3 %{python3_sitelib}/%{realname} %{python3_sitelib}/%{realname}-%{version}-py?.?.egg-info %endif %changelog +* Tue Aug 29 2017 Jan Beran - 0.7.7-9 +- Fix of missing Python 3 executables + * Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 0.7.7-8 - Python 2 binary package renamed to python2-rosinstall See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 From 37394c00e6dd3c416789e33f67c01ae2d1ae5716 Mon Sep 17 00:00:00 2001 From: aries Date: Oct 13 2017 06:52:35 +0000 Subject: [PATCH 2/3] Update python-rosinstall.spec According to reviewer comments in https://bugzilla.redhat.com/show_bug.cgi?id=1432565, there are kept just either Python 3 or Python 2 executables, not the both. --- diff --git a/python-rosinstall.spec b/python-rosinstall.spec index a44fe0f..a106ffa 100644 --- a/python-rosinstall.spec +++ b/python-rosinstall.spec @@ -102,21 +102,17 @@ popd %endif # with_python3 %install +%{__python2} setup.py install --force --skip-build --root $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 +install -p -m 0644 doc/_build/man/%{realname}.1 $RPM_BUILD_ROOT%{_mandir}/man1/ +rm -rf doc/_build/html/.buildinfo + %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py install --force --skip-build --root $RPM_BUILD_ROOT -# Rename Python 3 executables -for file in %{buildroot}/%{_bindir}/*; do - mv $file $file-3 -done popd %endif -%{__python2} setup.py install --force --skip-build --root $RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 -install -p -m 0644 doc/_build/man/%{realname}.1 $RPM_BUILD_ROOT%{_mandir}/man1/ -rm -rf doc/_build/html/.buildinfo - %check # python-rosinstall tests reach out to github, which won't work in mock. # Disabling for now @@ -128,7 +124,9 @@ rm -rf doc/_build/html/.buildinfo %files -n python2-%{realname} %license LICENSE %doc doc/_build/html README.rst -%{_bindir}/*[!'-3'] +%if !0%{?with_python3} +%{_bindir}/ +%endif %{python2_sitelib}/%{realname} %{python2_sitelib}/%{realname}-%{version}-py?.?.egg-info %{_mandir}/man1/%{realname}.1.gz @@ -136,13 +134,13 @@ rm -rf doc/_build/html/.buildinfo %if 0%{?with_python3} %files -n python3-%{realname} %license LICENSE -%{_bindir}/*-3 +%{_bindir}/ %{python3_sitelib}/%{realname} %{python3_sitelib}/%{realname}-%{version}-py?.?.egg-info %endif %changelog -* Tue Aug 29 2017 Jan Beran - 0.7.7-9 +* Fri Oct 13 2017 Jan Beran - 0.7.7-9 - Fix of missing Python 3 executables * Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 0.7.7-8 @@ -231,4 +229,4 @@ rm -rf doc/_build/html/.buildinfo - Update to release 0.6.17 * Wed Apr 25 2012 Rich Mattes - 0.6.15-1 -- Initial package +- Initial package \ No newline at end of file From 748c500af08fe63df3c7a46b269abeb042bb8809 Mon Sep 17 00:00:00 2001 From: aries Date: Oct 13 2017 06:58:46 +0000 Subject: [PATCH 3/3] Update python-rosinstall.spec - small corrections --- diff --git a/python-rosinstall.spec b/python-rosinstall.spec index a106ffa..bfbda35 100644 --- a/python-rosinstall.spec +++ b/python-rosinstall.spec @@ -125,7 +125,7 @@ popd %license LICENSE %doc doc/_build/html README.rst %if !0%{?with_python3} -%{_bindir}/ +%{_bindir}/* %endif %{python2_sitelib}/%{realname} %{python2_sitelib}/%{realname}-%{version}-py?.?.egg-info @@ -134,7 +134,7 @@ popd %if 0%{?with_python3} %files -n python3-%{realname} %license LICENSE -%{_bindir}/ +%{_bindir}/* %{python3_sitelib}/%{realname} %{python3_sitelib}/%{realname}-%{version}-py?.?.egg-info %endif @@ -229,4 +229,4 @@ popd - Update to release 0.6.17 * Wed Apr 25 2012 Rich Mattes - 0.6.15-1 -- Initial package \ No newline at end of file +- Initial package