[ros-rospkg] 01/01: add python3 support

Johannes Schauer josch at moszumanska.debian.org
Mon Oct 26 13:58:31 UTC 2015


This is an automated email from the git hooks/post-receive script.

josch pushed a commit to branch python3
in repository ros-rospkg.

commit 6a7dc3954715d159d24bebb8c4f1b905fed3ef9b
Author: Johannes 'josch' Schauer <josch at mister-muffin.de>
Date:   Sun Oct 18 12:14:04 2015 +0200

    add python3 support
---
 debian/control                            |  8 ++++----
 debian/patches/0004-python3-support.patch | 27 +++++++++++++++++++++++++++
 debian/patches/series                     |  1 +
 debian/rules                              | 12 +-----------
 4 files changed, 33 insertions(+), 15 deletions(-)

diff --git a/debian/control b/debian/control
index fa644c5..c97e201 100644
--- a/debian/control
+++ b/debian/control
@@ -5,16 +5,16 @@ Uploaders: Thomas Moulard <thomas.moulard at gmail.com>,
            Leopold Palomo-Avellaneda <leo at alaxarxa.net>
 Section: python
 Priority: optional
-Build-Depends: python-setuptools (>= 0.6b3), python-all (>= 2.6.6-3), debhelper (>= 7.4.3)
+Build-Depends: python3-setuptools (>= 0.6b3), python3-all (>= 2.6.6-3), debhelper (>= 7.4.3), dh-python
 Standards-Version: 3.9.6
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=debian-science/packages/ros/ros-rospkg.git
 Vcs-Git: git://anonscm.debian.org/debian-science/packages/ros/ros-rospkg.git
 Homepage: http://wiki.ros.org/rosdistro
-X-Python-Version: >= 2.7
+X-Python3-Version: >= 3.4
 
-Package: python-rospkg
+Package: python3-rospkg
 Architecture: all
-Depends: ${misc:Depends}, ${python:Depends}
+Depends: ${misc:Depends}, ${python3:Depends}
 Description: ROS package library
  Library for retrieving information about ROS packages and stacks. The
  rospkg Python module provides basic utilities for querying information about
diff --git a/debian/patches/0004-python3-support.patch b/debian/patches/0004-python3-support.patch
new file mode 100644
index 0000000..454765b
--- /dev/null
+++ b/debian/patches/0004-python3-support.patch
@@ -0,0 +1,27 @@
+--- a/src/rospkg/os_detect.py
++++ b/src/rospkg/os_detect.py
+@@ -150,13 +150,13 @@ 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 release_info.get("ID") == fdo_id:
+             self.release_info = release_info
+         else:
+             self.release_info = None
+ 
+     def is_os(self):
+-        return self.release_info is not None  and self.release_info.has_key("VERSION_ID")
++        return self.release_info is not None  and "VERSION_ID" in self.release_info
+ 
+     def get_version(self):
+         if self.is_os():
+@@ -165,7 +165,7 @@ class FdoDetect(OsDetector):
+ 
+     def get_codename(self):
+         if self.is_os():
+-            if self.release_info.has_key("VERSION"):
++            if "VERSION" in self.release_info:
+                 version = self.release_info["VERSION"]
+                 # FDO style: works with Fedora, Debian, Suse.
+                 if version.find("(") is not -1:
diff --git a/debian/patches/series b/debian/patches/series
index d78c7f5..0c3c6f4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 0001-Set-default-ROS_PACKAGE_PATH-to-usr-share.patch
 0002-Limit-search-in-usr-share.patch
 0003-Set-rosversion-to-Debian.patch
+0004-python3-support.patch
diff --git a/debian/rules b/debian/rules
index 6757c58..0ee8ee6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,16 +1,6 @@
 #!/usr/bin/make -f
-
-# This file was automatically generated by stdeb 0.6.0+git at
-# Fri, 28 Nov 2014 11:36:13 +0100
-
 %:
-	dh $@ --with python2 --buildsystem=python_distutils
-
-
-override_dh_clean:
-	rm -rf src/rospkg.egg-info
-	dh_clean
+	dh $@ --with python3 --buildsystem=pybuild
 
 get-orig-source:
 	uscan --verbose --force-download --repack --compress xz
-

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/ros/ros-rospkg.git



More information about the debian-science-commits mailing list