1 |
commit: 079e687284a647e9d00ee5c7bc5cb4972a4ed5ee |
2 |
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Aug 5 15:03:06 2020 +0000 |
4 |
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 5 15:30:09 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=079e6872 |
7 |
|
8 |
dev-ros/geodesy: py3 fixes |
9 |
|
10 |
Closes: https://bugs.gentoo.org/734708 |
11 |
Package-Manager: Portage-3.0.1, Repoman-2.3.23 |
12 |
Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org> |
13 |
|
14 |
dev-ros/geodesy/files/py3.patch | 41 ++++++++++++++++++++++++++++++++++++ |
15 |
dev-ros/geodesy/geodesy-0.5.5.ebuild | 1 + |
16 |
dev-ros/geodesy/geodesy-9999.ebuild | 1 + |
17 |
3 files changed, 43 insertions(+) |
18 |
|
19 |
diff --git a/dev-ros/geodesy/files/py3.patch b/dev-ros/geodesy/files/py3.patch |
20 |
new file mode 100644 |
21 |
index 00000000000..08259ee976c |
22 |
--- /dev/null |
23 |
+++ b/dev-ros/geodesy/files/py3.patch |
24 |
@@ -0,0 +1,41 @@ |
25 |
+Index: geodesy/src/geodesy/wu_point.py |
26 |
+=================================================================== |
27 |
+--- geodesy.orig/src/geodesy/wu_point.py |
28 |
++++ geodesy/src/geodesy/wu_point.py |
29 |
+@@ -159,12 +159,12 @@ class WuPointSet(): |
30 |
+ # Initialize way point information. |
31 |
+ self.way_point_ids = {} # points symbol table |
32 |
+ self.n_points = len(self.points) |
33 |
+- for wid in xrange(self.n_points): |
34 |
++ for wid in range(self.n_points): |
35 |
+ self.way_point_ids[self.points[wid].id.uuid] = wid |
36 |
+ |
37 |
+ # Create empty list of UTM points, corresponding to map points. |
38 |
+ # They will be evaluated lazily, when first needed. |
39 |
+- self.utm_points = [None for wid in xrange(self.n_points)] |
40 |
++ self.utm_points = [None for wid in range(self.n_points)] |
41 |
+ |
42 |
+ def __contains__(self, item): |
43 |
+ """ Point set membership. """ |
44 |
+@@ -259,7 +259,7 @@ class WuPointSet(): |
45 |
+ """ |
46 |
+ return self.way_point_ids.get(key, default) |
47 |
+ |
48 |
+- def next(self): |
49 |
++ def __next__(self): |
50 |
+ """ Next iteration point. |
51 |
+ |
52 |
+ :returns: Next :class:`WuPoint`. |
53 |
+Index: geodesy/tests/test_wu_point.py |
54 |
+=================================================================== |
55 |
+--- geodesy.orig/tests/test_wu_point.py |
56 |
++++ geodesy/tests/test_wu_point.py |
57 |
+@@ -127,7 +127,7 @@ class TestWuPoint(unittest.TestCase): |
58 |
+ self.assertEqual(wupts.get(uu).uuid(), uu) |
59 |
+ |
60 |
+ # test index() function |
61 |
+- for i in xrange(len(uuids)): |
62 |
++ for i in range(len(uuids)): |
63 |
+ self.assertEqual(wupts.index(uuids[i]), i) |
64 |
+ self.assertEqual(wupts.points[i].id.uuid, uuids[i]) |
65 |
+ |
66 |
|
67 |
diff --git a/dev-ros/geodesy/geodesy-0.5.5.ebuild b/dev-ros/geodesy/geodesy-0.5.5.ebuild |
68 |
index 597e80d1d00..88ea377b0cc 100644 |
69 |
--- a/dev-ros/geodesy/geodesy-0.5.5.ebuild |
70 |
+++ b/dev-ros/geodesy/geodesy-0.5.5.ebuild |
71 |
@@ -32,3 +32,4 @@ DEPEND="${RDEPEND} |
72 |
dev-cpp/gtest |
73 |
$(python_gen_cond_dep "dev-python/nose[\${PYTHON_USEDEP}]") |
74 |
)" |
75 |
+PATCHES=( "${FILESDIR}/py3.patch" ) |
76 |
|
77 |
diff --git a/dev-ros/geodesy/geodesy-9999.ebuild b/dev-ros/geodesy/geodesy-9999.ebuild |
78 |
index 597e80d1d00..88ea377b0cc 100644 |
79 |
--- a/dev-ros/geodesy/geodesy-9999.ebuild |
80 |
+++ b/dev-ros/geodesy/geodesy-9999.ebuild |
81 |
@@ -32,3 +32,4 @@ DEPEND="${RDEPEND} |
82 |
dev-cpp/gtest |
83 |
$(python_gen_cond_dep "dev-python/nose[\${PYTHON_USEDEP}]") |
84 |
)" |
85 |
+PATCHES=( "${FILESDIR}/py3.patch" ) |