openembedded-devel.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
From: Bartosz Golaszewski <brgl@bgdev.pl>
To: Khem Raj <raj.khem@gmail.com>,
	Bruce Ashfield <bruce.ashfield@gmail.com>,
	openembedded-devel@lists.openembedded.org
Cc: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: [meta-python][PATCH 078/149] python3-pynetlinux: fix relative imports
Date: Wed, 31 May 2023 10:23:26 +0200	[thread overview]
Message-ID: <20230531082437.10646-79-brgl@bgdev.pl> (raw)
In-Reply-To: <20230531082437.10646-1-brgl@bgdev.pl>

From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

Pull in a patch from upstream that addresses an issue with relative
imports.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 .../0002-Fixed-relative-imports.patch         | 60 +++++++++++++++++++
 .../python/python3-pynetlinux_1.1.bb          |  5 +-
 2 files changed, 64 insertions(+), 1 deletion(-)
 create mode 100644 meta-python/recipes-devtools/python/python3-pynetlinux/0002-Fixed-relative-imports.patch

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 @@
+From afb778669efbc658a29e6bdb1c4834fee42931aa Mon Sep 17 00:00:00 2001
+From: Robert Grant <rgrant@mdi.us.com>
+Date: Wed, 10 Sep 2014 14:56:33 -0400
+Subject: [PATCH] Fixed relative imports
+
+Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
+
+---
+Upstream-Status: Accepted
+
+ pynetlinux/__init__.py | 8 ++++----
+ pynetlinux/brctl.py    | 2 +-
+ pynetlinux/tap.py      | 2 +-
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/pynetlinux/__init__.py b/pynetlinux/__init__.py
+index dbbf392..b6e1b8e 100644
+--- a/pynetlinux/__init__.py
++++ b/pynetlinux/__init__.py
+@@ -2,7 +2,7 @@
+ #   import pylinux
+ # does a reasonable thing.
+ 
+-import brctl
+-import ifconfig
+-import tap
+-import route
++from . import brctl
++from . import ifconfig
++from . import tap
++from . import route
+diff --git a/pynetlinux/brctl.py b/pynetlinux/brctl.py
+index f54d176..a8b926e 100644
+--- a/pynetlinux/brctl.py
++++ b/pynetlinux/brctl.py
+@@ -3,7 +3,7 @@ import fcntl
+ import os
+ import struct
+ 
+-import ifconfig
++from . import ifconfig
+ 
+ SYSFS_NET_PATH = "/sys/class/net"
+ 
+diff --git a/pynetlinux/tap.py b/pynetlinux/tap.py
+index 0a0d59c..3f8ad3a 100644
+--- a/pynetlinux/tap.py
++++ b/pynetlinux/tap.py
+@@ -2,7 +2,7 @@ import fcntl
+ import os
+ import struct
+ 
+-import ifconfig
++from . import ifconfig
+ 
+ # From linux/if_tun.h
+ 
+-- 
+2.39.2
+
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"
 
 SRC_URI[sha256sum] = "4ad08298c9f5ba15a11cddc639ba8778cabdfc402b51066d9e0a325e5a5b391c"
 
-SRC_URI += "file://0001-setup.py-switch-to-setuptools.patch"
+SRC_URI += " \
+    file://0001-setup.py-switch-to-setuptools.patch \
+    file://0002-Fixed-relative-imports.patch \
+"
 
 inherit pypi setuptools3
-- 
2.39.2



  parent reply	other threads:[~2023-05-31  8:26 UTC|newest]

Thread overview: 99+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-31  8:22 [meta-python][PATCH 000/149] python3: improve run-time dependencies situation Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 001/149] python3-pyparted: add missing run-time dependencies Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 002/149] python3-send2trash: " Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 003/149] python3-pywbem: drop unneeded class from RDEPENDS Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 004/149] python3-pywbem: don't use PYTHON_PN Bartosz Golaszewski
2023-06-01 16:25   ` Khem Raj
2023-06-01 19:16     ` Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 005/149] python3-pywbem: order RDEPENDS alphabetically Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 006/149] python3-pywbem: add missing run-time dependencies Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 007/149] python3-mock: cleanup RDEPENDS Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 008/149] python3-mock: add missing run-time dependencies Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 009/149] python3-cson: fix " Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 010/149] python3-ldap: don't use PYTHON_PN Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 011/149] python3-ldap: add missing run-time dependencies Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 012/149] python3-pyrad: " Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 013/149] python3-html2text: " Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 014/149] python3-parse: don't use PYTHON_PN and improve coding style Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 015/149] python3-parse: add missing run-time dependencies Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 016/149] python3-meld3: " Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 017/149] python3-pyiface: " Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 018/149] python3-mpmath: " Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 019/149] python3-uswid: " Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 020/149] python3-xmlrunner: " Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 021/149] python3-editor: " Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 022/149] python3-pykwalify: don't use PYTHON_PN and improve coding style Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 023/149] python3-pykwalify: add missing run-time dependencies Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 024/149] python3-iperf: " Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 025/149] python3-sdnotify: " Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 026/149] python3-service-identity: " Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 027/149] python3-sqlsoup: " Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 028/149] python3-sqlalchemy: don't use PYTHON_PN and improve coding style Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 029/149] python3-sqlalchemy: add missing run-time dependencies Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 030/149] python3-pure-eval: " Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 031/149] python3-stack-data: fix coding style Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 032/149] python3-stack-data: add missing run-time dependencies Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 033/149] python3-sympy: " Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 034/149] python3-thrift: don't use PYTHON_PN and improve coding style Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 035/149] python3-thrift: add missing run-time dependencies Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 036/149] python3-tomlkit: " Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 037/149] python3-tornado: drop ${PN} from RDEPENDS Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 038/149] python3-tornado: fix coding style Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 039/149] python3-tornado: remove the testing submodule from FILES:${PN}-test Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 040/149] python3-tornado: add missing run-time dependencies Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 041/149] python3-trustme: " Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 042/149] python3-twofish: " Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 043/149] python3-txws: " Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 044/149] python3-web3: " Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 045/149] python3-uefi-firmware: " Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 046/149] python3-websockets: fix coding style Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 047/149] python3-websockets: add missing run-time dependencies Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 048/149] python3-xlrd: fix coding style Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 049/149] python3-xlrd: add missing run-time dependencies Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 050/149] python3-versiontools: " Bartosz Golaszewski
2023-05-31  8:22 ` [meta-python][PATCH 051/149] python3-typeguard: " Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 052/149] python3-process-tests: " Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 053/149] python3-pyatspi: " Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 054/149] python3-pydantic: don't use PYTHON_PN and improve coding style Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 055/149] python3-pydantic: add missing run-time dependencies Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 056/149] python3-python-vlc: " Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 057/149] python3-redis: fix coding style Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 058/149] python3-redis: add missing run-time dependencies Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 059/149] python3-raven: " Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 060/149] python3-pypng: new package Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 061/149] python3-qrcode: add missing run-time dependencies Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 062/149] python3-pyusb: fix " Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 063/149] python3-pytest-mock: add missing " Bartosz Golaszewski
2023-06-05 18:09   ` Khem Raj
2023-06-06  9:05     ` Bartosz Golaszewski
2023-06-06 15:10       ` Khem Raj
2023-05-31  8:23 ` [meta-python][PATCH 064/149] python3-pyroute2: fix coding style Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 065/149] python3-fcntl: add missing run-time dependencies Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 066/149] python3-pyproject-metadata: " Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 067/149] python3-pyproj: don't use PYTHON_PN Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 068/149] python3-pyproj: drop unnecessary run-time dependency Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 069/149] python3-pyproj: add missing run-time dependencies Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 070/149] python3-classes: new package Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 071/149] python3-pylyrics: add missing run-time dependencies Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 072/149] python3-pyjwt: stop using PYTHON_PN Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 073/149] python3-pyjwt: add missing run-time dependencies Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 074/149] python3-javaobj-py3: " Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 075/149] python3-pyjks: stop using PYTHON_PN Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 076/149] python3-pyjks: fix run-time dependencies Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 077/149] python3-pyexpect: add missing " Bartosz Golaszewski
2023-05-31  8:23 ` Bartosz Golaszewski [this message]
2023-05-31  8:23 ` [meta-python][PATCH 079/149] python3-pynetlinux: " Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 080/149] python3-pickleshare: " Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 081/149] python3-petact: " Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 082/149] python3-pefile: " Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 083/149] python3-jsonpath-rw: " Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 084/149] python3-jsonrpcclient: " Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 085/149] python3-jstyleson: " Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 086/149] python3-kconfiglib: " Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 087/149] python3-libevdev: " Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 088/149] python3-linux-procfs: " Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 089/149] python3-lockfile: " Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 090/149] python3-msm: fix coding style Bartosz Golaszewski
2023-05-31  8:23 ` [meta-python][PATCH 091/149] python3-lazy: new recipe Bartosz Golaszewski
2023-05-31  8:55 ` [oe] [meta-python][PATCH 000/149] python3: improve run-time dependencies situation ChenQi
2023-05-31  9:02   ` Bartosz Golaszewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230531082437.10646-79-brgl@bgdev.pl \
    --to=brgl@bgdev.pl \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=bruce.ashfield@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    --cc=raj.khem@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).