| |
@@ -5,18 +5,20 @@
|
| |
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
|
| |
%endif
|
| |
|
| |
- %global commit 6cdef863382f5c812030ee1c15e43c4f0b98149e
|
| |
- %global shortcommit %(c=%{commit}; echo ${c:0:7})
|
| |
%global realname rosdep
|
| |
|
| |
Name: python-%{realname}
|
| |
- Version: 0.11.4
|
| |
- Release: 13%{?dist}
|
| |
+ Version: 0.12.2
|
| |
+ Release: 1%{?dist}
|
| |
Summary: ROS System Dependency Installer
|
| |
|
| |
License: BSD
|
| |
URL: http://ros.org/wiki/%{realname}
|
| |
- Source0: https://github.com/ros-infrastructure/%{realname}/archive/%{commit}/%{realname}-%{commit}.tar.gz
|
| |
+ Source0: https://github.com/ros-infrastructure/%{realname}/archive/%{version}/%{realname}-%{version}.tar.gz
|
| |
+
|
| |
+ # Already accepted upstream
|
| |
+ Patch0: %{name}-0.12.2-rpm_expand.patch
|
| |
+ Patch1: %{name}-0.12.2-doc-build-python3.patch
|
| |
|
| |
BuildArch: noarch
|
| |
# Documentation
|
| |
@@ -27,6 +29,7 @@
|
| |
BuildRequires: python2-pyyaml
|
| |
BuildRequires: python2-catkin_pkg
|
| |
BuildRequires: python2-devel
|
| |
+ BuildRequires: python2-mock
|
| |
BuildRequires: python2-nose
|
| |
BuildRequires: python2-rosdistro >= 0.4.0
|
| |
BuildRequires: python2-rospkg >= 1.0.34
|
| |
@@ -35,6 +38,7 @@
|
| |
BuildRequires: python3-PyYAML
|
| |
BuildRequires: python3-catkin_pkg
|
| |
BuildRequires: python3-devel
|
| |
+ BuildRequires: python3-mock
|
| |
BuildRequires: python3-nose
|
| |
BuildRequires: python3-rosdistro >= 0.4.0
|
| |
BuildRequires: python3-rospkg >= 1.0.34
|
| |
@@ -54,6 +58,9 @@
|
| |
Requires: python2-catkin_pkg
|
| |
Requires: python2-rosdistro >= 0.4.0
|
| |
Requires: python2-rospkg >= 1.0.34
|
| |
+ %if 0%{?fedora}
|
| |
+ Recommends: python2-rpm
|
| |
+ %endif
|
| |
Obsoletes: python-%{realname} < 0.11.4-5
|
| |
%{?python_provide:%python_provide python2-%{realname}}
|
| |
|
| |
@@ -72,6 +79,9 @@
|
| |
Requires: python3-catkin_pkg
|
| |
Requires: python3-rosdistro >= 0.4.0
|
| |
Requires: python3-rospkg >= 1.0.34
|
| |
+ %if 0%{?fedora}
|
| |
+ Recommends: python3-rpm
|
| |
+ %endif
|
| |
%{?python_provide:%python_provide python3-%{realname}}
|
| |
|
| |
%description -n python3-%{realname}
|
| |
@@ -84,83 +94,73 @@
|
| |
%endif
|
| |
|
| |
%prep
|
| |
- %setup -qn %{realname}-%{commit}
|
| |
+ %autosetup -p1 -n %{realname}-%{version}
|
| |
|
| |
- %if 0%{?with_python3}
|
| |
- rm -rf %{py3dir}
|
| |
- cp -a . %{py3dir}
|
| |
- find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
|
| |
- %endif # with_python3
|
| |
-
|
| |
- find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python2}|'
|
| |
+ # Get rid of non-executable-script errors from rpmlint
|
| |
+ sed -i 's|#!/usr/bin/env python||' src/%{realname}2/*.py src/%{realname}2/platforms/*.py
|
| |
|
| |
%build
|
| |
- %{__python2} setup.py build
|
| |
- pushd doc
|
| |
- make man
|
| |
- make html
|
| |
- rm -f html/.buildinfo
|
| |
- popd
|
| |
+ %py2_build
|
| |
+
|
| |
+ PYTHONPATH=$PWD/src make -C doc man html
|
| |
+ rm doc/_build/html/.buildinfo
|
| |
|
| |
%if 0%{?with_python3}
|
| |
- pushd %{py3dir}
|
| |
- CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
|
| |
- popd
|
| |
+ %py3_build
|
| |
%endif # with_python3
|
| |
|
| |
%install
|
| |
- rm -rf $RPM_BUILD_ROOT
|
| |
+ %py2_install
|
| |
|
| |
- %{__python2} setup.py install --force --skip-build --root $RPM_BUILD_ROOT
|
| |
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
|
| |
install -p -m 0644 doc/man/rosdep.1 $RPM_BUILD_ROOT%{_mandir}/man1
|
| |
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/ros/rosdep/sources.list.d/
|
| |
touch $RPM_BUILD_ROOT%{_sysconfdir}/ros/rosdep/sources.list.d/20-default.list
|
| |
|
| |
- # Get rid of non-executable-script errors from rpmlint
|
| |
- 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
|
| |
+ %py3_install
|
| |
%endif # with_python3
|
| |
|
| |
- # Get rid of hidden file in documentation folder
|
| |
- rm -f doc/_build/.buildinfo
|
| |
-
|
| |
-
|
| |
- # Cannot currently run tests because they need to query Github
|
| |
- # %check
|
| |
- # PYTHONPATH=$RPM_BUILD_ROOT%{python2_sitelib} nosetests -w test
|
| |
+ # Cannot currently run all of the tests because some need to query Github
|
| |
+ %check
|
| |
+ PYTHONPATH=$RPM_BUILD_ROOT%{python2_sitelib} nosetests-2 test.test_rosdep_redhat
|
| |
|
| |
+ %if 0%{?with_python3}
|
| |
+ PYTHONPATH=$RPM_BUILD_ROOT%{python3_sitelib} nosetests-3 test.test_rosdep_redhat
|
| |
+ %endif
|
| |
|
| |
%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
|
| |
%dir %{_sysconfdir}/ros/rosdep/
|
| |
%dir %{_sysconfdir}/ros/rosdep/sources.list.d/
|
| |
%ghost %{_sysconfdir}/ros/rosdep/sources.list.d/20-default.list
|
| |
+ %endif
|
| |
+ %{python2_sitelib}/%{realname}-%{version}-py?.?.egg-info
|
| |
+ %{python2_sitelib}/%{realname}2
|
| |
|
| |
%if 0%{?with_python3}
|
| |
%files -n python3-%{realname}
|
| |
%license LICENSE
|
| |
%{_bindir}/*
|
| |
+ %{_mandir}/man1/*.gz
|
| |
+ %dir %{_sysconfdir}/ros/rosdep/
|
| |
+ %dir %{_sysconfdir}/ros/rosdep/sources.list.d/
|
| |
+ %ghost %{_sysconfdir}/ros/rosdep/sources.list.d/20-default.list
|
| |
%{python3_sitelib}/%{realname}-%{version}-py?.?.egg-info
|
| |
%{python3_sitelib}/%{realname}2
|
| |
%endif
|
| |
|
| |
%changelog
|
| |
+ * Fri Sep 14 2018 Scott K Logan <logans@cottsay.net> - 0.12.2-1
|
| |
+ - Update to 0.12.2 (rhbz#1476259)
|
| |
+ - Fix missing infrastructure files after making python 3 the default
|
| |
+ - Enable at least SOME tests
|
| |
+ - Make python-rpm recommended (will fall back to RPM CLI if not present)
|
| |
+
|
| |
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.4-13
|
| |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
| |
|
| |
Also:
- Fix missing infrastructure files after making python 3 the default
- Enable at least SOME tests
- Make python-rpm recommended (will fall back to RPM CLI if not present)