[packages/python-nose] - cleanup after moving default command to python3
qboosh
qboosh at pld-linux.org
Wed May 28 20:02:09 CEST 2025
commit c8cebe557bf24fb511d25b8d1adac34512262b0b
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Wed May 28 19:47:34 2025 +0200
- cleanup after moving default command to python3
python-nose.spec | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
---
diff --git a/python-nose.spec b/python-nose.spec
index 1ee2e25..f26a642 100644
--- a/python-nose.spec
+++ b/python-nose.spec
@@ -139,23 +139,24 @@ rm -rf $RPM_BUILD_ROOT
%py_install
%py_postclean
+
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/nosetests{,-%{py_ver}}
%endif
%if %{with python3}
%py3_install
+
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/nosetests{,-%{py3_ver}}
+ln -sf nosetests-%{py3_ver} $RPM_BUILD_ROOT%{_bindir}/nosetests
%endif
%{__mv} $RPM_BUILD_ROOT%{_prefix}/man $RPM_BUILD_ROOT%{_datadir}
-for v in %{py_ver} %{py3_ver} ; do
+for v in %{?with_python2:%{py_ver}} %{?with_python3:%{py3_ver}} ; do
cp -p $RPM_BUILD_ROOT%{_mandir}/man1/nosetests.1 $RPM_BUILD_ROOT%{_mandir}/man1/nosetests-${v}.1
done
-%if %{with python2}
-# default to python2 for now
-ln -sf nosetests-%{py_ver} $RPM_BUILD_ROOT%{_bindir}/nosetests
-echo '.so nosetests-%{py_ver}.1' > $RPM_BUILD_ROOT%{_mandir}/man1/nosetests.1
-%else
-ln -sf nosetests-%{py3_ver} $RPM_BUILD_ROOT%{_bindir}/nosetests
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/nosetests.1
+%if %{with python3}
echo '.so nosetests-%{py3_ver}.1' > $RPM_BUILD_ROOT%{_mandir}/man1/nosetests.1
%endif
@@ -170,21 +171,18 @@ rm -rf $RPM_BUILD_ROOT
%{py_sitescriptdir}/%{module}
%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
%{_mandir}/man1/nosetests-%{py_ver}.1*
-%{_mandir}/man1/nosetests.1*
%endif
%if %{with python3}
%files -n python3-%{module}
%defattr(644,root,root,755)
%doc AUTHORS CHANGELOG NEWS README.txt
+%attr(755,root,root) %{_bindir}/nosetests
%attr(755,root,root) %{_bindir}/nosetests-%{py3_ver}
%{py3_sitescriptdir}/%{module}
%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
-%{_mandir}/man1/nosetests-%{py3_ver}.1*
-%if %{without python2}
-%attr(755,root,root) %{_bindir}/nosetests
%{_mandir}/man1/nosetests.1*
-%endif
+%{_mandir}/man1/nosetests-%{py3_ver}.1*
%endif
%if %{with doc}
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-nose.git/commitdiff/c8cebe557bf24fb511d25b8d1adac34512262b0b
More information about the pld-cvs-commit
mailing list