[ros-dynamic-reconfigure] 01/01: add python3 support
Johannes Schauer
josch at moszumanska.debian.org
Mon Oct 26 13:55:40 UTC 2015
This is an automated email from the git hooks/post-receive script.
josch pushed a commit to branch python3
in repository ros-dynamic-reconfigure.
commit 136f6beaf5e10c18dd4952a6f5ca3ba5c7426198
Author: Johannes 'josch' Schauer <josch at mister-muffin.de>
Date: Sun Oct 18 11:23:07 2015 +0200
add python3 support
---
debian/control | 12 +--
debian/patches/Python3-support.patch | 132 ++++++++++++++++++++++++++++
debian/patches/series | 1 +
debian/python-dynamic-reconfigure.install | 1 -
debian/python-dynamic-reconfigure.pyinstall | 2 -
debian/python3-dynamic-reconfigure.install | 2 +
debian/rules | 29 +-----
7 files changed, 145 insertions(+), 34 deletions(-)
diff --git a/debian/control b/debian/control
index 477e6a1..dc9868b 100644
--- a/debian/control
+++ b/debian/control
@@ -6,15 +6,15 @@ Uploaders: Thomas Moulard <thomas.moulard at gmail.com>,
Leopold Palomo-Avellaneda <leo at alaxarxa.net>
Build-Depends: debhelper (>= 9), dh-exec (>=0.3),
catkin, libroscpp-core-dev, message-generation, libstd-msgs-dev,
- python-rospy, python-rostest,
- python-all (>= 2.6.6-3), python-setuptools (>= 0.6b3),
+ python3-rospy, python3-rostest,
+ python3-all (>= 2.6.6-3), python3-setuptools (>= 0.6b3),
libboost-dev, libboost-thread-dev, libboost-signals-dev,
libboost-filesystem-dev, libboost-regex-dev,
libroscpp-dev,
librosconsole-dev,
libros-rosgraph-msgs-dev,
libxmlrpcpp-dev,
- python-rosunit,
+ python3-rosunit,
libroscpp-msgs-dev,
libconsole-bridge-dev
Standards-Version: 3.9.6
@@ -36,17 +36,17 @@ Package: libdynamic-reconfigure-dev
Section: libdevel
Architecture: any
Depends: ${misc:Depends}, libdynamic-reconfigure0d ( = ${binary:Version}),
- ${python:Depends}, python
+ ${python3:Depends}, python3
Description: ROS dynamic-reconfigure library - development files
This unary stack contains the dynamic_reconfigure package which provides a
means to change node parameters at any time without having to restart the node.
.
This package contains the development files.
-Package: python-dynamic-reconfigure
+Package: python3-dynamic-reconfigure
Section: python
Architecture: all
-Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends}, python-genpy, python-std-msgs, python-roslib
+Depends: ${python3:Depends}, ${shlibs:Depends}, ${misc:Depends}, python3-genpy, python3-std-msgs, python3-roslib
Description: ROS dynamic-reconfigure library - Python
This unary stack contains the dynamic_reconfigure package which provides a
means to change node parameters at any time without having to restart the node.
diff --git a/debian/patches/Python3-support.patch b/debian/patches/Python3-support.patch
new file mode 100644
index 0000000..a62a0b8
--- /dev/null
+++ b/debian/patches/Python3-support.patch
@@ -0,0 +1,132 @@
+--- a/src/dynamic_reconfigure/parameter_generator.py
++++ b/src/dynamic_reconfigure/parameter_generator.py
+@@ -40,6 +40,8 @@
+ # Need to check types of min max and default
+ # Need to put sane error on exceptions
+
++from __future__ import print_function
++
+ import roslib; roslib.load_manifest("dynamic_reconfigure")
+ import roslib.packages
+ from string import Template
+@@ -304,8 +306,8 @@ class ParameterGenerator:
+ try:
+ #print '**************************************************************'
+ #print '**************************************************************'
+- print Template("Generating reconfiguration files for $name in $pkgname").\
+- substitute(name=self.name, pkgname = self.pkgname)
++ print(Template("Generating reconfiguration files for $name in $pkgname").\
++ substitute(name=self.name, pkgname = self.pkgname))
+ #print '**************************************************************'
+ #print '**************************************************************'
+ self.generatecpp()
+@@ -314,8 +316,8 @@ class ParameterGenerator:
+ self.generateusage()
+ self.generatepy()
+ self.deleteobsolete()
+- except Exception, e:
+- print "Error building srv %s.srv"%name
++ except Exception as e:
++ print("Error building srv %s.srv"%name)
+ import traceback
+ traceback.print_exc()
+ exit(1)
+@@ -323,12 +325,12 @@ class ParameterGenerator:
+ def generatewikidoc(self):
+ self.mkdir("docs")
+ f = open(os.path.join(self.pkgpath, "docs", self.msgname+".wikidoc"), 'w')
+- print >> f, \
++ print(
+ """# Autogenerated param section. Do not hand edit.
+ param {
+ group.0 {
+ name=Dynamically Reconfigurable Parameters
+-desc=See the [[dynamic_reconfigure]] package for details on dynamically reconfigurable parameters."""
++desc=See the [[dynamic_reconfigure]] package for details on dynamically reconfigurable parameters.""", file=f)
+ i=-1
+ for param in self.group.get_parameters():
+ i=i+1
+@@ -340,28 +342,28 @@ desc=See the [[dynamic_reconfigure]] pac
+ except:
+ if param['type'] == int_t or param['type'] == double_t:
+ range = Template("Range: $min to $max").substitute(param)
+- print >> f, Template(
++ print(Template(
+ """$i.name= ~$name
+ $i.default= $default
+ $i.type= $type
+ $i.desc=$description $range"""
+-).substitute(param, range = range, i = i)
+- print >> f,"}\n}\n# End of autogenerated section. You may edit below."
++).substitute(param, range = range, i = i), file=f)
++ print("}\n}\n# End of autogenerated section. You may edit below.", file=f)
+ f.close()
+
+ def generateusage(self):
+ self.mkdir("docs")
+ f = open(os.path.join(self.pkgpath, "docs", self.msgname+"-usage.dox"), 'w')
+ #print >> f, "/**"
+- print >> f, "\\subsubsection usage Usage"
+- print >> f, '\\verbatim'
+- print >> f, Template('<node name="$nodename" pkg="$pkgname" type="$nodename">').\
+- substitute(pkgname = self.pkgname, nodename = self.nodename)
++ print("\\subsubsection usage Usage", file=f)
++ print('\\verbatim', file=f)
++ print(Template('<node name="$nodename" pkg="$pkgname" type="$nodename">').\
++ substitute(pkgname = self.pkgname, nodename = self.nodename), file=f)
+ for param in self.group.get_parameters():
+- print >> f, Template(' <param name="$name" type="$type" value="$default" />').substitute(param)
+- print >> f, '</node>'
+- print >> f, '\\endverbatim'
+- print >> f
++ print(Template(' <param name="$name" type="$type" value="$default" />').substitute(param), file=f)
++ print('</node>', file=f)
++ print('\\endverbatim', file=f)
++ print(f, file=f)
+ #print >> f, "*/"
+ f.close()
+
+@@ -369,13 +371,13 @@ $i.desc=$description $range"""
+ self.mkdir("docs")
+ f = open(os.path.join(self.pkgpath, "docs", self.msgname+".dox"), 'w')
+ #print >> f, "/**"
+- print >> f, "\\subsubsection parameters ROS parameters"
+- print >> f
+- print >> f, "Reads and maintains the following parameters on the ROS server"
+- print >> f
++ print("\\subsubsection parameters ROS parameters", file=f)
++ print(file=f)
++ print("Reads and maintains the following parameters on the ROS server", file=f)
++ print(file=f)
+ for param in self.group.get_parameters():
+- print >> f, Template("- \\b \"~$name\" : \\b [$type] $description min: $min, default: $default, max: $max").substitute(param)
+- print >> f
++ print(Template("- \\b \"~$name\" : \\b [$type] $description min: $min, default: $default, max: $max").substitute(param), file=f)
++ print(file=f)
+ #print >> f, "*/"
+ f.close()
+
+@@ -383,15 +385,15 @@ $i.desc=$description $range"""
+ self.mkdir("docs")
+ f = open(os.path.join(self.pkgpath, "docs", self.msgname+"-usage.dox"), 'w')
+ #print >> f, "/**"
+- print >> f, "\\subsubsection usage Usage"
+- print >> f, '\\verbatim'
+- print >> f, Template('<node name="$nodename" pkg="$pkgname" type="$nodename">').\
+- substitute(pkgname = self.pkgname, nodename = self.nodename)
++ print("\\subsubsection usage Usage", file=f)
++ print('\\verbatim', file=f)
++ print(Template('<node name="$nodename" pkg="$pkgname" type="$nodename">').\
++ substitute(pkgname = self.pkgname, nodename = self.nodename), file=f)
+ for param in self.group.get_parameters():
+- print >> f, Template(' <param name="$name" type="$type" value="$default" />').substitute(param)
+- print >> f, '</node>'
+- print >> f, '\\endverbatim'
+- print >> f
++ print(Template(' <param name="$name" type="$type" value="$default" />').substitute(param), file=f)
++ print('</node>', file=f)
++ print('\\endverbatim', file=f)
++ print(file=f)
+ #print >> f, "*/"
+ f.close()
+
diff --git a/debian/patches/series b/debian/patches/series
index b7da620..fa7b521 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
0001-Add-Debian-specific-SONAME.patch
+Python3-support.patch
diff --git a/debian/python-dynamic-reconfigure.install b/debian/python-dynamic-reconfigure.install
deleted file mode 100644
index 8dbfea1..0000000
--- a/debian/python-dynamic-reconfigure.install
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/dynamic_reconfigure/* usr/bin
diff --git a/debian/python-dynamic-reconfigure.pyinstall b/debian/python-dynamic-reconfigure.pyinstall
deleted file mode 100644
index f33b3fd..0000000
--- a/debian/python-dynamic-reconfigure.pyinstall
+++ /dev/null
@@ -1,2 +0,0 @@
-debian/tmp/usr/lib/python2*/*/dynamic_reconfigure/*.py dynamic_reconfigure
-debian/tmp/usr/lib/python2*/*/dynamic_reconfigure/msg/*.py dynamic_reconfigure.msg
diff --git a/debian/python3-dynamic-reconfigure.install b/debian/python3-dynamic-reconfigure.install
new file mode 100644
index 0000000..4b82d1b
--- /dev/null
+++ b/debian/python3-dynamic-reconfigure.install
@@ -0,0 +1,2 @@
+usr/lib/dynamic_reconfigure/* usr/bin
+usr/lib/python3*/*/dynamic_reconfigure
diff --git a/debian/rules b/debian/rules
index 1664c3b..519ae64 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,35 +1,14 @@
#!/usr/bin/make -f
-# See debhelper(7) (uncomment to enable)
-# output every command that modifies files on the build system.
-#DH_VERBOSE = 1
-
-# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
-DPKG_EXPORT_BUILDFLAGS = 1
-include /usr/share/dpkg/default.mk
-
-# see FEATURE AREAS in dpkg-buildflags(1)
-#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
-
-# see ENVIRONMENT in dpkg-buildflags(1)
-# package maintainers to append CFLAGS
-#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
-# package maintainers to append LDFLAGS
-#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
-
-
-# main packaging script based on dh7 syntax
%:
- dh $@ --parallel --buildsystem=cmake --with python2
-
+ dh $@ --parallel --buildsystem=cmake --with python3
override_dh_auto_configure:
dh_auto_configure -- \
- -DCATKIN_ENABLE_TESTING=OFF
+ -DCATKIN_ENABLE_TESTING=OFF -DPython_ADDITIONAL_VERSIONS=3.4
override_dh_auto_clean:
rm -f src/dynamic_reconfigure/parameter_generator_catkin.pyc
dh_auto_clean
-
-
-
+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-dynamic-reconfigure.git
More information about the debian-science-commits
mailing list