diff --git a/.gitignore b/.gitignore index 031e9b0..37ddaa7 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /rospkg-1.0.21-f188dfb.tar.gz /rospkg-1.0.26-dc49f90.tar.gz /rospkg-1.0.27-18f227f.tar.gz +/rospkg-1.0.28-4cee3f4.tar.gz diff --git a/python-rospkg.spec b/python-rospkg.spec index 59beb8c..0237c42 100644 --- a/python-rospkg.spec +++ b/python-rospkg.spec @@ -1,24 +1,34 @@ -%global commit 18f227ffa043bfc82656f3a28cc6d14feb5befba +%if 0%{?rhel} && 0%{?rhel} <= 6 +%{!?__python2: %global __python2 /usr/bin/python2} +%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} +%endif + +%global commit 4cee3f4c28afea1c55f82371cb9cac91edf5de06 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global realname rospkg Name: python-rospkg -Version: 1.0.27 +Version: 1.0.28 Release: 1%{?dist} Summary: Utilities for ROS package, stack, and distribution information License: BSD URL: http://ros.org/wiki/rospkg Source0: https://github.com/ros-infrastructure/%{realname}/archive/%{commit}/%{realname}-%{version}-%{shortcommit}.tar.gz -# Remove dependency on catkin-sphinx for now -Patch0: rospkg-0.1.20-catkinsphinx.patch + +# Remove python-argparse from runtime dependency list (rhbz#1088448) +Patch0: %{realname}-1.0.28-argparse.patch + BuildArch: noarch -BuildRequires: python-devel -BuildRequires: python-setuptools-devel +BuildRequires: python2-devel +BuildRequires: python-setuptools +BuildRequires: python-catkin-sphinx BuildRequires: python-sphinx BuildRequires: PyYAML + Requires: PyYAML +Requires: python-argparse %description The ROS packaging system simplifies development and distribution of code @@ -28,17 +38,35 @@ release your code for others to use. %prep %setup -qn %{realname}-%{commit} -%patch0 -p0 -b .catkinsphinx +%if 0%{?fedora} || 0%{?rhel} > 6 +%patch0 -p0 -b .argparse +%endif %build -%{__python} setup.py build +%{__python2} setup.py build pushd doc +make html make man popd +rm -f doc/_build/html/.buildinfo + +%check +# Tests expect the base folder name to be 'rospkg', so move the source folder +cd .. +mv %{realname}-%{commit} %{realname} +cd %{realname} +# Run the nosetests +pushd test +PYTHONPATH=%{buildroot}%{python2_sitelib} nosetests +popd +# Put the source folder back to its original name +cd .. +mv %{realname} %{realname}-%{commit} +cd %{realname}-%{commit} %install rm -rf $RPM_BUILD_ROOT -%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT +%{__python2} setup.py install --skip-build --root $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{realname} install -p -m 0644 manifest.xml $RPM_BUILD_ROOT%{_datadir}/%{realname} mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 @@ -47,13 +75,21 @@ install -p -m 0644 doc/man/rosversion.1 $RPM_BUILD_ROOT%{_mandir}/man1 sed -i 's|#!/usr/bin/env python||' $RPM_BUILD_ROOT%{python_sitelib}/%{realname}/*.py %files +%doc doc/_build/html %{_bindir}/* -%{python_sitelib}/%{realname}-%{version}-py?.?.egg-info -%{python_sitelib}/%{realname} +%{python2_sitelib}/%{realname}-%{version}-py?.?.egg-info +%{python2_sitelib}/%{realname} %{_mandir}/man1/*.gz %{_datadir}/%{realname} %changelog +* Wed Apr 16 2014 Rich Mattes - 1.0.28-1 +- Update to release 1.0.28 +- Remove argparse from python dependency list (rhbz#1088448) +- Add requirement on python-argparse +- Add check section +- Add html documentation + * Fri Apr 04 2014 Scott K Logan - 1.0.27-1 - Update to release 1.0.27 - Added PyYAML BuildRequires and Requires diff --git a/sources b/sources index c3a6a21..6162a1e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f43f743a0098c03a3fd832c21185e44d rospkg-1.0.27-18f227f.tar.gz +9109af091e185426fee633413711e665 rospkg-1.0.28-4cee3f4.tar.gz