Re: [PATCH 2/2] lirc: correctly use PYTHONPATH


Martin Jansa
 

Please don't change SRC_URI indentation, meta-oe uses 4 spaces for indentation with closing quote as the first character as described on https://www.openembedded.org/wiki/Styleguide


On Wed, Nov 9, 2022 at 9:06 PM Alexander Kanavin <alex.kanavin@...> wrote:
Signed-off-by: Alexander Kanavin <alex@...>
---
 ...ot-clobber-PYTHONPATH-from-build-env.patch | 55 +++++++++++++++++++
 .../recipes-connectivity/lirc/lirc_0.10.2.bb  | 21 +++----
 2 files changed, 66 insertions(+), 10 deletions(-)
 create mode 100644 meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/0001-Makefile.am-do-not-clobber-PYTHONPATH-from-build-env.patch

diff --git a/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/0001-Makefile.am-do-not-clobber-PYTHONPATH-from-build-env.patch b/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/0001-Makefile.am-do-not-clobber-PYTHONPATH-from-build-env.patch
new file mode 100644
index 000000000..089ed23c7
--- /dev/null
+++ b/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/0001-Makefile.am-do-not-clobber-PYTHONPATH-from-build-env.patch
@@ -0,0 +1,55 @@
+From 5e3b74927b4fef03d91518d235e9e3ba8cd7ab2e Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex@...>
+Date: Wed, 9 Nov 2022 20:49:41 +0100
+Subject: [PATCH] Makefile.am: do not clobber PYTHONPATH from build environment
+
+This environment variable has special significance for python,
+and so lirc's variable has to be named something else.
+
+Signed-off-by: Alexander Kanavin <alex@...>
+---
+ Makefile.am       | 2 +-
+ pylint.mak        | 2 +-
+ tools/Makefile.am | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 6718af1..fae423e 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -128,7 +128,7 @@ endif
+
+ pylint: .phony
+       $(MAKE) -C tools pylint
+-      -PYTHONPATH=$(PYTHONPATH) $(PYLINT) --rcfile=pylint.conf \
++      -PYTHONPATH=$(LIRCPYTHONPATH) $(PYLINT) --rcfile=pylint.conf \
+       --msg-template='$(pylint_template)' $(py_PYTHON)
+
+ pep8: $(py_PYTHON)
+diff --git a/pylint.mak b/pylint.mak
+index bf427ab..2692951 100644
+--- a/pylint.mak
++++ b/pylint.mak
+@@ -1,5 +1,5 @@
+ PYTHONPATH1      = $(abs_top_srcdir)/python-pkg/lirc:
+ PYTHONPATH2      = $(abs_top_srcdir)/python-pkg/lirc/lib/.libs
+-PYTHONPATH       = $(PYTHONPATH1):$(PYTHONPATH2)
++LIRCPYTHONPATH   = $(PYTHONPATH1):$(PYTHONPATH2)
+ PYLINT           = python3-pylint
+ pylint_template  = {path}:{line}: [{msg_id}({symbol}), {obj}] {msg}
+diff --git a/tools/Makefile.am b/tools/Makefile.am
+index 85d1fd0..96b17f8 100644
+--- a/tools/Makefile.am
++++ b/tools/Makefile.am
+@@ -142,7 +142,7 @@ force-pylint: .phony
+
+ pylint: .pylint-stamp
+ .pylint-stamp: $(py_sources)
+-      -PYTHONPATH=$(PYTHONPATH) $(PYLINT) --rcfile=../pylint.conf \
++      -PYTHONPATH=$(LIRCPYTHONPATH) $(PYLINT) --rcfile=../pylint.conf \
+       --msg-template='$(pylint_template)' $? && touch $@
+
+ .phony:
+--
+2.30.2
+
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc_0.10.2.bb b/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc_0.10.2.bb
index 234d347af..458d9d7cd 100644
--- a/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc_0.10.2.bb
+++ b/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc_0.10.2.bb
@@ -11,16 +11,17 @@ DEPENDS = "libxslt-native alsa-lib libftdi libusb1 libusb-compat jack portaudio-
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"

 SRC_URI = "http://prdownloads.sourceforge.net/lirc/lirc-${PV}.tar.bz2 \
-    file://0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch \
-    file://fix_build_errors.patch \
-    file://0001-mplay-Fix-build-with-musl.patch \
-    file://lircd.service \
-    file://lircd.init \
-    file://lircexec.init \
-    file://lircd.conf \
-    file://lirc_options.conf \
-    file://lirc.tmpfiles \
-"
+           file://0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch \
+           file://fix_build_errors.patch \
+           file://0001-mplay-Fix-build-with-musl.patch \
+           file://lircd.service \
+           file://lircd.init \
+           file://lircexec.init \
+           file://lircd.conf \
+           file://lirc_options.conf \
+           file://lirc.tmpfiles \
+           file://0001-Makefile.am-do-not-clobber-PYTHONPATH-from-build-env.patch \
+           "
 SRC_URI[sha256sum] = "3d44ec8274881cf262f160805641f0827ffcc20ade0d85e7e6f3b90e0d3d222a"

 SYSTEMD_PACKAGES = "lirc lirc-exec"
--
2.30.2




Join openembedded-devel@lists.openembedded.org to automatically receive all group messages.