summaryrefslogtreecommitdiffstats
path: root/meta-python
diff options
context:
space:
mode:
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>2023-05-31 10:23:26 +0200
committerKhem Raj <raj.khem@gmail.com>2023-06-06 23:07:59 -0700
commit1a3d3d13648012829c4e76e11095696f91b58ca1 (patch)
tree5977964b565d73a2f5561a90670dca9508481c65 /meta-python
parentb06204baf3bc4883c67311dce1d2ff7f72f393c0 (diff)
downloadmeta-openembedded-1a3d3d13648012829c4e76e11095696f91b58ca1.tar.gz
python3-pynetlinux: fix relative imports
Pull in a patch from upstream that addresses an issue with relative imports. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python')
-rw-r--r--meta-python/recipes-devtools/python/python3-pynetlinux/0002-Fixed-relative-imports.patch60
-rw-r--r--meta-python/recipes-devtools/python/python3-pynetlinux_1.1.bb5
2 files changed, 64 insertions, 1 deletions
diff --git a/meta-python/recipes-devtools/python/python3-pynetlinux/0002-Fixed-relative-imports.patch b/meta-python/recipes-devtools/python/python3-pynetlinux/0002-Fixed-relative-imports.patch
new file mode 100644
index 000000000..9b5d9d636
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-pynetlinux/0002-Fixed-relative-imports.patch
@@ -0,0 +1,60 @@
1From afb778669efbc658a29e6bdb1c4834fee42931aa Mon Sep 17 00:00:00 2001
2From: Robert Grant <rgrant@mdi.us.com>
3Date: Wed, 10 Sep 2014 14:56:33 -0400
4Subject: [PATCH] Fixed relative imports
5
6Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
7
8---
9Upstream-Status: Accepted
10
11 pynetlinux/__init__.py | 8 ++++----
12 pynetlinux/brctl.py | 2 +-
13 pynetlinux/tap.py | 2 +-
14 3 files changed, 6 insertions(+), 6 deletions(-)
15
16diff --git a/pynetlinux/__init__.py b/pynetlinux/__init__.py
17index dbbf392..b6e1b8e 100644
18--- a/pynetlinux/__init__.py
19+++ b/pynetlinux/__init__.py
20@@ -2,7 +2,7 @@
21 # import pylinux
22 # does a reasonable thing.
23
24-import brctl
25-import ifconfig
26-import tap
27-import route
28+from . import brctl
29+from . import ifconfig
30+from . import tap
31+from . import route
32diff --git a/pynetlinux/brctl.py b/pynetlinux/brctl.py
33index f54d176..a8b926e 100644
34--- a/pynetlinux/brctl.py
35+++ b/pynetlinux/brctl.py
36@@ -3,7 +3,7 @@ import fcntl
37 import os
38 import struct
39
40-import ifconfig
41+from . import ifconfig
42
43 SYSFS_NET_PATH = "/sys/class/net"
44
45diff --git a/pynetlinux/tap.py b/pynetlinux/tap.py
46index 0a0d59c..3f8ad3a 100644
47--- a/pynetlinux/tap.py
48+++ b/pynetlinux/tap.py
49@@ -2,7 +2,7 @@ import fcntl
50 import os
51 import struct
52
53-import ifconfig
54+from . import ifconfig
55
56 # From linux/if_tun.h
57
58--
592.39.2
60
diff --git a/meta-python/recipes-devtools/python/python3-pynetlinux_1.1.bb b/meta-python/recipes-devtools/python/python3-pynetlinux_1.1.bb
index a5ac74fd6..c6ab07448 100644
--- a/meta-python/recipes-devtools/python/python3-pynetlinux_1.1.bb
+++ b/meta-python/recipes-devtools/python/python3-pynetlinux_1.1.bb
@@ -7,6 +7,9 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=74e1861736ee959824fe7542323c12e9"
7 7
8SRC_URI[sha256sum] = "4ad08298c9f5ba15a11cddc639ba8778cabdfc402b51066d9e0a325e5a5b391c" 8SRC_URI[sha256sum] = "4ad08298c9f5ba15a11cddc639ba8778cabdfc402b51066d9e0a325e5a5b391c"
9 9
10SRC_URI += "file://0001-setup.py-switch-to-setuptools.patch" 10SRC_URI += " \
11 file://0001-setup.py-switch-to-setuptools.patch \
12 file://0002-Fixed-relative-imports.patch \
13"
11 14
12inherit pypi setuptools3 15inherit pypi setuptools3