diff options
author | nick83ola <nick83ola@gmail.com> | 2019-10-23 09:14:42 +0100 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2019-10-24 01:01:44 -0700 |
commit | c1812d8cec20346b863e32b6a1a6e95dc0a6c2fd (patch) | |
tree | b5f655dce7641c03db902f7c0518eab13cf4916a /meta-python/recipes-connectivity/python-pyconnman | |
parent | 5886d975722e900e16f049aa762e53d2eab44f72 (diff) | |
download | meta-openembedded-c1812d8cec20346b863e32b6a1a6e95dc0a6c2fd.tar.gz |
python3-pyconnman: fix import issues with python3
release 0.1.0 of pyconnman is not using relative import so it
crashes when you try to load it with python3.
Add patch from upstream to make it work.
Signed-off-by: Nicola Lunghi <nick83ola@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python/recipes-connectivity/python-pyconnman')
2 files changed, 78 insertions, 0 deletions
diff --git a/meta-python/recipes-connectivity/python-pyconnman/python3-pyconnman/0001-Import-local-modules-by-relative-path-for-python3-su.patch b/meta-python/recipes-connectivity/python-pyconnman/python3-pyconnman/0001-Import-local-modules-by-relative-path-for-python3-su.patch new file mode 100644 index 000000000..977b4aacd --- /dev/null +++ b/meta-python/recipes-connectivity/python-pyconnman/python3-pyconnman/0001-Import-local-modules-by-relative-path-for-python3-su.patch | |||
@@ -0,0 +1,74 @@ | |||
1 | From 2e84adb042bfb742eb328220b97f79ddb28db44b Mon Sep 17 00:00:00 2001 | ||
2 | From: Haris Okanovic <haris.okanovic@ni.com> | ||
3 | Date: Tue, 23 Oct 2018 21:39:56 +0000 | ||
4 | Subject: [PATCH] Import local modules by relative path for python3 support | ||
5 | |||
6 | Upstream-Status: Submitted | ||
7 | --- | ||
8 | pyconnman/agent.py | 2 +- | ||
9 | pyconnman/interface.py | 2 +- | ||
10 | pyconnman/manager.py | 2 +- | ||
11 | pyconnman/service.py | 2 +- | ||
12 | pyconnman/technology.py | 2 +- | ||
13 | 5 files changed, 5 insertions(+), 5 deletions(-) | ||
14 | |||
15 | diff --git a/pyconnman/agent.py b/pyconnman/agent.py | ||
16 | index f72de8d..453d783 100644 | ||
17 | --- a/pyconnman/agent.py | ||
18 | +++ b/pyconnman/agent.py | ||
19 | @@ -1,5 +1,5 @@ | ||
20 | from __future__ import unicode_literals | ||
21 | -from exceptions import ConnCanceledException | ||
22 | +from .exceptions import ConnCanceledException | ||
23 | |||
24 | import dbus.service | ||
25 | |||
26 | diff --git a/pyconnman/interface.py b/pyconnman/interface.py | ||
27 | index 7d82e04..d540c81 100644 | ||
28 | --- a/pyconnman/interface.py | ||
29 | +++ b/pyconnman/interface.py | ||
30 | @@ -4,7 +4,7 @@ import dbus | ||
31 | import types | ||
32 | import pprint | ||
33 | |||
34 | -from exceptions import ConnSignalNameNotRecognisedException | ||
35 | +from .exceptions import ConnSignalNameNotRecognisedException | ||
36 | |||
37 | |||
38 | def translate_to_dbus_type(typeof, value): | ||
39 | diff --git a/pyconnman/manager.py b/pyconnman/manager.py | ||
40 | index f6f40a8..03244cc 100644 | ||
41 | --- a/pyconnman/manager.py | ||
42 | +++ b/pyconnman/manager.py | ||
43 | @@ -1,6 +1,6 @@ | ||
44 | from __future__ import unicode_literals | ||
45 | |||
46 | -from interface import ConnInterface | ||
47 | +from .interface import ConnInterface | ||
48 | |||
49 | |||
50 | class ConnManager(ConnInterface): | ||
51 | diff --git a/pyconnman/service.py b/pyconnman/service.py | ||
52 | index bbccced..c6b9241 100644 | ||
53 | --- a/pyconnman/service.py | ||
54 | +++ b/pyconnman/service.py | ||
55 | @@ -1,6 +1,6 @@ | ||
56 | from __future__ import unicode_literals | ||
57 | |||
58 | -from interface import ConnInterface | ||
59 | +from .interface import ConnInterface | ||
60 | |||
61 | |||
62 | class ConnService(ConnInterface): | ||
63 | diff --git a/pyconnman/technology.py b/pyconnman/technology.py | ||
64 | index 4777229..d25bad6 100644 | ||
65 | --- a/pyconnman/technology.py | ||
66 | +++ b/pyconnman/technology.py | ||
67 | @@ -1,6 +1,6 @@ | ||
68 | from __future__ import unicode_literals | ||
69 | |||
70 | -from interface import ConnInterface | ||
71 | +from .interface import ConnInterface | ||
72 | |||
73 | |||
74 | class ConnTechnology(ConnInterface): | ||
diff --git a/meta-python/recipes-connectivity/python-pyconnman/python3-pyconnman_0.1.0.bb b/meta-python/recipes-connectivity/python-pyconnman/python3-pyconnman_0.1.0.bb index e0f3fdd75..32bbe8b80 100644 --- a/meta-python/recipes-connectivity/python-pyconnman/python3-pyconnman_0.1.0.bb +++ b/meta-python/recipes-connectivity/python-pyconnman/python3-pyconnman_0.1.0.bb | |||
@@ -2,4 +2,8 @@ require python-pyconnman.inc | |||
2 | 2 | ||
3 | inherit setuptools3 | 3 | inherit setuptools3 |
4 | 4 | ||
5 | SRC_URI_append = " \ | ||
6 | file://0001-Import-local-modules-by-relative-path-for-python3-su.patch \ | ||
7 | " | ||
8 | |||
5 | RDEPENDS_${PN} += "python3-dbus python3-pprint" | 9 | RDEPENDS_${PN} += "python3-dbus python3-pprint" |