commit:     950fe17d65a620b9cdc5f84abe7c75d9dfc52c67
Author:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 13 08:17:05 2015 +0000
Commit:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Tue Oct 13 08:17:05 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=950fe17d

dev-python/rospkg: Add patch to fix python3 compatibility.

Package-Manager: portage-2.2.23

 dev-python/rospkg/files/py3.patch                   | 21 +++++++++++++++++++++
 ...rospkg-1.0.37.ebuild => rospkg-1.0.37-r1.ebuild} |  1 +
 2 files changed, 22 insertions(+)

diff --git a/dev-python/rospkg/files/py3.patch 
b/dev-python/rospkg/files/py3.patch
new file mode 100644
index 0000000..268ff89
--- /dev/null
+++ b/dev-python/rospkg/files/py3.patch
@@ -0,0 +1,21 @@
+https://github.com/ros-infrastructure/rospkg/pull/90
+
+commit 7be8d9e5ec3c6bffd970e93053078b707879c7b9
+Author: Alexis Ballier <aball...@gentoo.org>
+Date:   Tue Oct 13 10:08:42 2015 +0200
+
+    src/rospkg/os_detect.py: Use "string in dict" instead of 
"dict.has_key(string)" for python3 compatibility.
+
+diff --git a/src/rospkg/os_detect.py b/src/rospkg/os_detect.py
+index 14b57c2..554b607 100644
+--- a/src/rospkg/os_detect.py
++++ b/src/rospkg/os_detect.py
+@@ -150,7 +150,7 @@ class FdoDetect(OsDetector):
+     """
+     def __init__(self, fdo_id):
+         release_info = read_os_release()
+-        if release_info is not None and release_info.has_key("ID") and 
release_info["ID"] == fdo_id:
++        if release_info is not None and "ID" in release_info and 
release_info["ID"] == fdo_id:
+             self.release_info = release_info
+         else:
+             self.release_info = None

diff --git a/dev-python/rospkg/rospkg-1.0.37.ebuild 
b/dev-python/rospkg/rospkg-1.0.37-r1.ebuild
similarity index 98%
rename from dev-python/rospkg/rospkg-1.0.37.ebuild
rename to dev-python/rospkg/rospkg-1.0.37-r1.ebuild
index 06dd93b..526c071 100644
--- a/dev-python/rospkg/rospkg-1.0.37.ebuild
+++ b/dev-python/rospkg/rospkg-1.0.37-r1.ebuild
@@ -41,6 +41,7 @@ DEPEND="${RDEPEND}
 "
 PATCHES=(
        "${FILESDIR}/norecurse.patch"
+       "${FILESDIR}/py3.patch"
 )
 
 python_test() {

Reply via email to