lirc: correctly use PYTHONPATH

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Alexander Kanavin
2022-11-09 21:05:58 +01:00
committed by Khem Raj
parent 4035dfc557
commit 9d35b819f3
2 changed files with 66 additions and 10 deletions
@@ -0,0 +1,55 @@
From 5e3b74927b4fef03d91518d235e9e3ba8cd7ab2e Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex@linutronix.de>
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@linutronix.de>
---
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
@@ -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"