[python-rosdep/f19] F19 exception fix, python macros, remove pythonpip patch

Scott K Logan cottsay at fedoraproject.org
Mon Jun 9 21:15:29 UTC 2014


commit fcf7ff52cc625ea38f5b60cdd9dc20a44fe7ceb2
Author: Scott K Logan <logans at cottsay.net>
Date:   Mon May 19 22:14:19 2014 -0500

    F19 exception fix, python macros, remove pythonpip patch

 python-rosdep.spec                      |   42 +++++++++++++++++++-----------
 rosdep-0.10.14-pythonpip.patch          |   28 --------------------
 rosdep-0.10.27-unicode-exceptions.patch |   31 ++++++++++++++++++++++
 3 files changed, 57 insertions(+), 44 deletions(-)
---
diff --git a/python-rosdep.spec b/python-rosdep.spec
index e4236aa..33b787b 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 <logans at cottsay.net> - 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 <richmattes at gmail.com> - 0.10.27-1
 - Update to release 0.10.27
 - Build html documentation
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 <logans at cottsay.net>
+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
+


More information about the scm-commits mailing list