All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Makefile: allow to override python3
@ 2021-05-01 20:12 Andrey Zhizhikin
  2021-05-04 15:26 ` Simon Glass
  2021-05-18 22:26 ` Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Andrey Zhizhikin @ 2021-05-01 20:12 UTC (permalink / raw)
  To: u-boot

Python3 taken from the PATH causes build issues when pylibfdt bindings are
generated with Yocto SDK.

Python3 provided as a part of SDK is not compatible with host Python3,
therefore binding build breaks with following errors:

scripts/dtc/pylibfdt/libfdt_wrap.c:154:11: fatal error: Python.h: No such file or directory
  154 | # include <Python.h>
      |           ^~~~~~~~~~

Do not enforce the python3 from the PATH and make it conditionally-assigned
so it can be overridden from outside of build system. Keep the default
assignment to point to version that is taken from the PATH.

Similar fix has been introduced in b48bfc74ee ("tools: allow to override
python"), where conditional assignment is used for python executable to
address similar build errors.

Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Cc: Simon Glass <sjg@chromium.org>
Fixes: e91610da7c ("kconfig: re-sync with Linux 4.17-rc4")
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 404977efa5..f033ab39f2 100644
--- a/Makefile
+++ b/Makefile
@@ -408,7 +408,7 @@ AWK		= awk
 PERL		= perl
 PYTHON		?= python
 PYTHON2		= python2
-PYTHON3		= python3
+PYTHON3		?= python3
 DTC		?= $(objtree)/scripts/dtc/dtc
 CHECK		= sparse
 
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] Makefile: allow to override python3
  2021-05-01 20:12 [PATCH] Makefile: allow to override python3 Andrey Zhizhikin
@ 2021-05-04 15:26 ` Simon Glass
  2021-05-18 22:26 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2021-05-04 15:26 UTC (permalink / raw)
  To: u-boot

On Sat, 1 May 2021 at 14:13, Andrey Zhizhikin
<andrey.zhizhikin@leica-geosystems.com> wrote:
>
> Python3 taken from the PATH causes build issues when pylibfdt bindings are
> generated with Yocto SDK.
>
> Python3 provided as a part of SDK is not compatible with host Python3,
> therefore binding build breaks with following errors:
>
> scripts/dtc/pylibfdt/libfdt_wrap.c:154:11: fatal error: Python.h: No such file or directory
>   154 | # include <Python.h>
>       |           ^~~~~~~~~~
>
> Do not enforce the python3 from the PATH and make it conditionally-assigned
> so it can be overridden from outside of build system. Keep the default
> assignment to point to version that is taken from the PATH.
>
> Similar fix has been introduced in b48bfc74ee ("tools: allow to override
> python"), where conditional assignment is used for python executable to
> address similar build errors.
>
> Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
> Cc: Simon Glass <sjg@chromium.org>
> Fixes: e91610da7c ("kconfig: re-sync with Linux 4.17-rc4")
> ---
>  Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] Makefile: allow to override python3
  2021-05-01 20:12 [PATCH] Makefile: allow to override python3 Andrey Zhizhikin
  2021-05-04 15:26 ` Simon Glass
@ 2021-05-18 22:26 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2021-05-18 22:26 UTC (permalink / raw)
  To: u-boot

On Sat, May 01, 2021 at 10:12:21PM +0200, Andrey Zhizhikin wrote:

> Python3 taken from the PATH causes build issues when pylibfdt bindings are
> generated with Yocto SDK.
> 
> Python3 provided as a part of SDK is not compatible with host Python3,
> therefore binding build breaks with following errors:
> 
> scripts/dtc/pylibfdt/libfdt_wrap.c:154:11: fatal error: Python.h: No such file or directory
>   154 | # include <Python.h>
>       |           ^~~~~~~~~~
> 
> Do not enforce the python3 from the PATH and make it conditionally-assigned
> so it can be overridden from outside of build system. Keep the default
> assignment to point to version that is taken from the PATH.
> 
> Similar fix has been introduced in b48bfc74ee ("tools: allow to override
> python"), where conditional assignment is used for python executable to
> address similar build errors.
> 
> Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
> Cc: Simon Glass <sjg@chromium.org>
> Fixes: e91610da7c ("kconfig: re-sync with Linux 4.17-rc4")
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210518/bffb3c97/attachment.sig>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-18 22:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-01 20:12 [PATCH] Makefile: allow to override python3 Andrey Zhizhikin
2021-05-04 15:26 ` Simon Glass
2021-05-18 22:26 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.