From ff6b777a86acfe0a5c7dcb44320f29ceb49cb452 Mon Sep 17 00:00:00 2001 From: Scott K Logan Date: May 20 2014 03:14:19 +0000 Subject: F19 exception fix, python macros, remove pythonpip patch --- diff --git a/python-rosdep.spec b/python-rosdep.spec index c3763bc..66d724c 100644 --- a/python-rosdep.spec +++ b/python-rosdep.spec @@ -4,27 +4,24 @@ Name: python-rosdep Version: 0.10.27 -Release: 1%{?dist} +Release: 2%{?dist} Summary: ROS System Dependency Installer License: BSD URL: http://ros.org/wiki/rosdep Source0: https://github.com/ros-infrastructure/%{realname}/archive/%{commit}/%{realname}-%{version}-%{shortcommit}.tar.gz -# Change all "pip" executable references to "python-pip" -# Fedora-only patch, not submitted upstream. -Patch0: %{realname}-0.10.14-pythonpip.patch -# Disable catkin-sphinx for now, until it's packaged -#Patch1: %{realname}-0.10.14-catkinsphinx.patch +# Submitted and applied upstream +Patch0: %{realname}-0.10.27-unicode-exceptions.patch BuildArch: noarch BuildRequires: PyYAML BuildRequires: python-catkin_pkg BuildRequires: python-catkin-sphinx -BuildRequires: python-devel -BuildRequires: python-nose +BuildRequires: python2-devel +# BuildRequires: python-mock +# BuildRequires: python-nose BuildRequires: python-rosdistro >= 0.3.0 BuildRequires: python-rospkg -BuildRequires: python-devel BuildRequires: python-sphinx Requires: PyYAML >= 3.1 @@ -45,19 +42,21 @@ specify a dependency on 'boost'. %prep %setup -qn %{realname}-%{commit} -%patch0 -p0 -b .pythonpip +%patch0 -p1 -b .unicode-exceptions + %build -%{__python} setup.py build +%{__python2} setup.py build pushd doc make man make html +rm -f html/.buildinfo popd %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 @@ -66,17 +65,23 @@ 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%{python_sitelib}/rosdep2/*.py -sed -i 's|#!/usr/bin/env python||' $RPM_BUILD_ROOT%{python_sitelib}/rosdep2/platforms/*.py +sed -i 's|#!/usr/bin/env python||' $RPM_BUILD_ROOT%{python2_sitelib}/rosdep2/*.py +sed -i 's|#!/usr/bin/env python||' $RPM_BUILD_ROOT%{python2_sitelib}/rosdep2/platforms/*.py # 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 + + %files %doc LICENSE README.md doc/_build/html %{_bindir}/* -%{python_sitelib}/%{realname}-%{version}-py?.?.egg-info -%{python_sitelib}/%{realname}2 +%{python2_sitelib}/%{realname}-%{version}-py?.?.egg-info +%{python2_sitelib}/%{realname}2 %{_mandir}/man1/*.gz %{_datadir}/%{realname} %dir %{_sysconfdir}/ros/rosdep/ @@ -85,6 +90,11 @@ rm -f doc/_build/.buildinfo %changelog +* Mon May 19 2014 Scott K Logan - 0.10.27-2 +- Fix for F19 release name in exceptions +- Update python macros to packaging spec +- Remove pythonpip patch, which is not needed for F19+ + * Sat Apr 12 2014 Rich Mattes - 0.10.27-1 - Update to release 0.10.27 - Build html documentation diff --git a/rosdep-0.10.14-pythonpip.patch b/rosdep-0.10.14-pythonpip.patch deleted file mode 100644 index 6d813af..0000000 --- a/rosdep-0.10.14-pythonpip.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- ../rosdep-0.10.14.orig/src/rosdep2/platforms/pip.py 2013-02-20 11:04:36.000000000 +1100 -+++ src/rosdep2/platforms/pip.py 2013-03-16 13:32:51.651890938 +1100 -@@ -44,7 +44,7 @@ - - def is_pip_installed(): - try: -- subprocess.Popen(['pip'], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() -+ subprocess.Popen(['python-pip'], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() - return True - except OSError: - return False -@@ -57,7 +57,7 @@ - """ - if exec_fn is None: - exec_fn = read_stdout -- pkg_list = exec_fn(['pip', 'freeze']).split('\n') -+ pkg_list = exec_fn(['python-pip', 'freeze']).split('\n') - - ret_list = [] - for pkg in pkg_list: -@@ -81,5 +81,5 @@ - if not packages: - return [] - else: -- return [['sudo', 'pip', 'install', '-U', p] for p in packages] -+ return [['sudo', 'python-pip', 'install', '-U', p] for p in packages] - - diff --git a/rosdep-0.10.27-unicode-exceptions.patch b/rosdep-0.10.27-unicode-exceptions.patch new file mode 100644 index 0000000..37ca44a --- /dev/null +++ b/rosdep-0.10.27-unicode-exceptions.patch @@ -0,0 +1,31 @@ +From f8335a4262236bc6b679898c4c5e4b845f7e1306 Mon Sep 17 00:00:00 2001 +From: Scott K Logan +Date: Wed, 30 Apr 2014 20:49:07 -0600 +Subject: [PATCH] Workaround for extended characters in errors + +--- + src/rosdep2/main.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/rosdep2/main.py b/src/rosdep2/main.py +index 9580696..d0cc582 100644 +--- a/src/rosdep2/main.py ++++ b/src/rosdep2/main.py +@@ -516,11 +516,11 @@ def command_check(lookup, packages, options): + + def error_to_human_readable(error): + if isinstance(error, rospkg.ResourceNotFound): +- return "Missing resource %s"%(str(error)) ++ return "Missing resource %s"%(error,) + elif isinstance(error, ResolutionError): +- return str(error.args[0]) ++ return "%s"%(error.args[0],) + else: +- return str(error) ++ return "%s"%(error,) + + def command_install(lookup, packages, options): + # map options +-- +1.9.3 +