diff mbox series

[01/10] package/pkg-python.mk: remove $(2)_PYTHON_INTERPRETER variable

Message ID 20230930221727.1458825-2-arnout@mind.be
State Accepted
Headers show
Series [01/10] package/pkg-python.mk: remove $(2)_PYTHON_INTERPRETER variable | expand

Commit Message

Arnout Vandecappelle Sept. 30, 2023, 10:16 p.m. UTC
This is a leftover from python 2/3. Since the interpreter is now always
python3, we can simply call it like that - like is done in all the other
places where python is called.

While we're at it, call python3 explicitly rather than relying on the
symlink.

Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
---
 package/pkg-python.mk | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

Comments

Yann E. MORIN Nov. 25, 2023, 3:39 p.m. UTC | #1
Arnout, All,

On 2023-10-01 00:16 +0200, Arnout Vandecappelle via buildroot spake thusly:
> This is a leftover from python 2/3. Since the interpreter is now always
> python3, we can simply call it like that - like is done in all the other
> places where python is called.
> 
> While we're at it, call python3 explicitly rather than relying on the
> symlink.
> 
> Signed-off-by: Arnout Vandecappelle <arnout@mind.be>

Applied to next, thanks.

Regards,
Yann E. MORIN.

> ---
>  package/pkg-python.mk | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)
> 
> diff --git a/package/pkg-python.mk b/package/pkg-python.mk
> index 28ee4cb85f..1fc096efb3 100644
> --- a/package/pkg-python.mk
> +++ b/package/pkg-python.mk
> @@ -325,10 +325,6 @@ $(2)_DOWNLOAD_POST_PROCESS = cargo
>  $(2)_DOWNLOAD_DEPENDENCIES = host-rustc
>  endif # SETUP_TYPE
>  
> -# Python interpreter to use for building the package.
> -#
> -$(2)_PYTHON_INTERPRETER = $$(HOST_DIR)/bin/python
> -
>  #
>  # Build step. Only define it if not already defined by the package .mk
>  # file.
> @@ -337,7 +333,7 @@ ifndef $(2)_BUILD_CMDS
>  define $(2)_BUILD_CMDS
>  	(cd $$($$(PKG)_BUILDDIR)/; \
>  		$$($$(PKG)_BASE_ENV) $$($$(PKG)_ENV) \
> -		$$($(2)_PYTHON_INTERPRETER) \
> +		$$(HOST_DIR)/bin/python3 \
>  		$$($$(PKG)_BASE_BUILD_CMD) \
>  		$$($$(PKG)_BASE_BUILD_OPTS) $$($$(PKG)_BUILD_OPTS))
>  endef
> @@ -351,7 +347,7 @@ ifndef $(2)_INSTALL_CMDS
>  define $(2)_INSTALL_CMDS
>  	(cd $$($$(PKG)_BUILDDIR)/; \
>  		$$($$(PKG)_BASE_ENV) $$($$(PKG)_ENV) \
> -		$$($(2)_PYTHON_INTERPRETER) \
> +		$$(HOST_DIR)/bin/python3 \
>  		$$($$(PKG)_BASE_INSTALL_CMD) \
>  		$$($$(PKG)_INSTALL_OPTS))
>  endef
> @@ -365,7 +361,7 @@ ifndef $(2)_INSTALL_TARGET_CMDS
>  define $(2)_INSTALL_TARGET_CMDS
>  	(cd $$($$(PKG)_BUILDDIR)/; \
>  		$$($$(PKG)_BASE_ENV) $$($$(PKG)_ENV) \
> -		$$($(2)_PYTHON_INTERPRETER) \
> +		$$(HOST_DIR)/bin/python3 \
>  		$$($$(PKG)_BASE_INSTALL_TARGET_CMD) \
>  		$$($$(PKG)_INSTALL_TARGET_OPTS))
>  endef
> @@ -379,7 +375,7 @@ ifndef $(2)_INSTALL_STAGING_CMDS
>  define $(2)_INSTALL_STAGING_CMDS
>  	(cd $$($$(PKG)_BUILDDIR)/; \
>  		$$($$(PKG)_BASE_ENV) $$($$(PKG)_ENV) \
> -		$$($(2)_PYTHON_INTERPRETER) \
> +		$$(HOST_DIR)/bin/python3 \
>  		$$($$(PKG)_BASE_INSTALL_STAGING_CMD) \
>  		$$($$(PKG)_INSTALL_STAGING_OPTS))
>  endef
> -- 
> 2.41.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
diff mbox series

Patch

diff --git a/package/pkg-python.mk b/package/pkg-python.mk
index 28ee4cb85f..1fc096efb3 100644
--- a/package/pkg-python.mk
+++ b/package/pkg-python.mk
@@ -325,10 +325,6 @@  $(2)_DOWNLOAD_POST_PROCESS = cargo
 $(2)_DOWNLOAD_DEPENDENCIES = host-rustc
 endif # SETUP_TYPE
 
-# Python interpreter to use for building the package.
-#
-$(2)_PYTHON_INTERPRETER = $$(HOST_DIR)/bin/python
-
 #
 # Build step. Only define it if not already defined by the package .mk
 # file.
@@ -337,7 +333,7 @@  ifndef $(2)_BUILD_CMDS
 define $(2)_BUILD_CMDS
 	(cd $$($$(PKG)_BUILDDIR)/; \
 		$$($$(PKG)_BASE_ENV) $$($$(PKG)_ENV) \
-		$$($(2)_PYTHON_INTERPRETER) \
+		$$(HOST_DIR)/bin/python3 \
 		$$($$(PKG)_BASE_BUILD_CMD) \
 		$$($$(PKG)_BASE_BUILD_OPTS) $$($$(PKG)_BUILD_OPTS))
 endef
@@ -351,7 +347,7 @@  ifndef $(2)_INSTALL_CMDS
 define $(2)_INSTALL_CMDS
 	(cd $$($$(PKG)_BUILDDIR)/; \
 		$$($$(PKG)_BASE_ENV) $$($$(PKG)_ENV) \
-		$$($(2)_PYTHON_INTERPRETER) \
+		$$(HOST_DIR)/bin/python3 \
 		$$($$(PKG)_BASE_INSTALL_CMD) \
 		$$($$(PKG)_INSTALL_OPTS))
 endef
@@ -365,7 +361,7 @@  ifndef $(2)_INSTALL_TARGET_CMDS
 define $(2)_INSTALL_TARGET_CMDS
 	(cd $$($$(PKG)_BUILDDIR)/; \
 		$$($$(PKG)_BASE_ENV) $$($$(PKG)_ENV) \
-		$$($(2)_PYTHON_INTERPRETER) \
+		$$(HOST_DIR)/bin/python3 \
 		$$($$(PKG)_BASE_INSTALL_TARGET_CMD) \
 		$$($$(PKG)_INSTALL_TARGET_OPTS))
 endef
@@ -379,7 +375,7 @@  ifndef $(2)_INSTALL_STAGING_CMDS
 define $(2)_INSTALL_STAGING_CMDS
 	(cd $$($$(PKG)_BUILDDIR)/; \
 		$$($$(PKG)_BASE_ENV) $$($$(PKG)_ENV) \
-		$$($(2)_PYTHON_INTERPRETER) \
+		$$(HOST_DIR)/bin/python3 \
 		$$($$(PKG)_BASE_INSTALL_STAGING_CMD) \
 		$$($$(PKG)_INSTALL_STAGING_OPTS))
 endef