summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2020-08-05 17:03:06 +0200
committerAlexis Ballier <aballier@gentoo.org>2020-08-05 17:30:09 +0200
commit079e687284a647e9d00ee5c7bc5cb4972a4ed5ee (patch)
treef1eb553f03f5b0892f6ef8fc75da425d8c27ca89 /dev-ros/geodesy
parentdev-ros/calibration_estimation: fix py3 compat (diff)
downloadgentoo-079e687284a647e9d00ee5c7bc5cb4972a4ed5ee.tar.gz
gentoo-079e687284a647e9d00ee5c7bc5cb4972a4ed5ee.tar.bz2
gentoo-079e687284a647e9d00ee5c7bc5cb4972a4ed5ee.zip
dev-ros/geodesy: py3 fixes
Closes: https://bugs.gentoo.org/734708 Package-Manager: Portage-3.0.1, Repoman-2.3.23 Signed-off-by: Alexis Ballier <aballier@gentoo.org>
Diffstat (limited to 'dev-ros/geodesy')
-rw-r--r--dev-ros/geodesy/files/py3.patch41
-rw-r--r--dev-ros/geodesy/geodesy-0.5.5.ebuild1
-rw-r--r--dev-ros/geodesy/geodesy-9999.ebuild1
3 files changed, 43 insertions, 0 deletions
diff --git a/dev-ros/geodesy/files/py3.patch b/dev-ros/geodesy/files/py3.patch
new file mode 100644
index 000000000000..08259ee976c1
--- /dev/null
+++ b/dev-ros/geodesy/files/py3.patch
@@ -0,0 +1,41 @@
+Index: geodesy/src/geodesy/wu_point.py
+===================================================================
+--- geodesy.orig/src/geodesy/wu_point.py
++++ geodesy/src/geodesy/wu_point.py
+@@ -159,12 +159,12 @@ class WuPointSet():
+ # Initialize way point information.
+ self.way_point_ids = {} # points symbol table
+ self.n_points = len(self.points)
+- for wid in xrange(self.n_points):
++ for wid in range(self.n_points):
+ self.way_point_ids[self.points[wid].id.uuid] = wid
+
+ # Create empty list of UTM points, corresponding to map points.
+ # They will be evaluated lazily, when first needed.
+- self.utm_points = [None for wid in xrange(self.n_points)]
++ self.utm_points = [None for wid in range(self.n_points)]
+
+ def __contains__(self, item):
+ """ Point set membership. """
+@@ -259,7 +259,7 @@ class WuPointSet():
+ """
+ return self.way_point_ids.get(key, default)
+
+- def next(self):
++ def __next__(self):
+ """ Next iteration point.
+
+ :returns: Next :class:`WuPoint`.
+Index: geodesy/tests/test_wu_point.py
+===================================================================
+--- geodesy.orig/tests/test_wu_point.py
++++ geodesy/tests/test_wu_point.py
+@@ -127,7 +127,7 @@ class TestWuPoint(unittest.TestCase):
+ self.assertEqual(wupts.get(uu).uuid(), uu)
+
+ # test index() function
+- for i in xrange(len(uuids)):
++ for i in range(len(uuids)):
+ self.assertEqual(wupts.index(uuids[i]), i)
+ self.assertEqual(wupts.points[i].id.uuid, uuids[i])
+
diff --git a/dev-ros/geodesy/geodesy-0.5.5.ebuild b/dev-ros/geodesy/geodesy-0.5.5.ebuild
index 597e80d1d00e..88ea377b0cc7 100644
--- a/dev-ros/geodesy/geodesy-0.5.5.ebuild
+++ b/dev-ros/geodesy/geodesy-0.5.5.ebuild
@@ -32,3 +32,4 @@ DEPEND="${RDEPEND}
dev-cpp/gtest
$(python_gen_cond_dep "dev-python/nose[\${PYTHON_USEDEP}]")
)"
+PATCHES=( "${FILESDIR}/py3.patch" )
diff --git a/dev-ros/geodesy/geodesy-9999.ebuild b/dev-ros/geodesy/geodesy-9999.ebuild
index 597e80d1d00e..88ea377b0cc7 100644
--- a/dev-ros/geodesy/geodesy-9999.ebuild
+++ b/dev-ros/geodesy/geodesy-9999.ebuild
@@ -32,3 +32,4 @@ DEPEND="${RDEPEND}
dev-cpp/gtest
$(python_gen_cond_dep "dev-python/nose[\${PYTHON_USEDEP}]")
)"
+PATCHES=( "${FILESDIR}/py3.patch" )