[Buildroot] [PATCH 1/1] package/pkg-python.mk: switch back to local setuptools distutils

Arnout Vandecappelle arnout at mind.be
Sun Jun 25 14:03:18 UTC 2023



On 25/06/2023 00:00, James Hilliard wrote:
> We overrode the default in 4386bbdf0895dbb35e02c25f42603bae9af64451 to
> work around target shebang bug, as this issue no longer appears to be
> present lets revert back to the local version as this is what will be
> use in the future when distutils is removed from the python stdlib.
> 
> Tested with:
> $ support/testing/run-tests -d dl -o output_folder -k tests.package.test_ipython.TestIPythonPy3
> 15:43:26 TestIPythonPy3                           Starting
> 15:43:27 TestIPythonPy3                           Building
> 15:49:35 TestIPythonPy3                           Building done
> Downloading to /home/buildroot/buildroot/dl/tmp_iyk_fn6
> Renaming from /home/buildroot/buildroot/dl/tmp_iyk_fn6 to /home/buildroot/buildroot/dl/kernel-versatile-5.10.7
> Downloading to /home/buildroot/buildroot/dl/tmpokk23l2z
> Renaming from /home/buildroot/buildroot/dl/tmpokk23l2z to /home/buildroot/buildroot/dl/versatile-pb-5.10.7.dtb
> 15:50:04 TestIPythonPy3                           Cleaning up
> .
> ----------------------------------------------------------------------
> Ran 1 test in 398.709s
> 
> OK
> 
> $ head -n 1 output_folder/TestIPythonPy3/target/usr/bin/ipython
> #!/usr/bin/python
> 
> Signed-off-by: James Hilliard <james.hilliard1 at gmail.com>

  Applied to master, thanks.

  Regards,
  Arnout

> ---
>   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 c15a168f60..fcb8fa0a99 100644
> --- a/package/pkg-python.mk
> +++ b/package/pkg-python.mk
> @@ -55,8 +55,7 @@ HOST_PKG_PYTHON_ENV = \
>   # Target distutils-based packages
>   PKG_PYTHON_DISTUTILS_ENV = \
>   	$(PKG_PYTHON_ENV) \
> -	LDSHARED="$(TARGET_CROSS)gcc -shared" \
> -	SETUPTOOLS_USE_DISTUTILS=stdlib \
> +	LDSHARED="$(TARGET_CROSS)gcc -shared"
>   
>   PKG_PYTHON_DISTUTILS_BUILD_OPTS = \
>   	--executable=/usr/bin/python
> @@ -75,16 +74,14 @@ PKG_PYTHON_DISTUTILS_INSTALL_STAGING_OPTS = \
>   
>   # Host distutils-based packages
>   HOST_PKG_PYTHON_DISTUTILS_ENV = \
> -	$(HOST_PKG_PYTHON_ENV) \
> -	SETUPTOOLS_USE_DISTUTILS=stdlib
> +	$(HOST_PKG_PYTHON_ENV)
>   
>   HOST_PKG_PYTHON_DISTUTILS_INSTALL_OPTS = \
>   	--prefix=$(HOST_DIR)
>   
>   # Target setuptools-based packages
>   PKG_PYTHON_SETUPTOOLS_ENV = \
> -	$(PKG_PYTHON_ENV) \
> -	SETUPTOOLS_USE_DISTUTILS=stdlib
> +	$(PKG_PYTHON_ENV)
>   
>   PKG_PYTHON_SETUPTOOLS_CMD = \
>   	$(if $(wildcard $($(PKG)_BUILDDIR)/setup.py),setup.py,-c 'from setuptools import setup;setup()')
> @@ -105,8 +102,7 @@ PKG_PYTHON_SETUPTOOLS_INSTALL_STAGING_OPTS = \
>   
>   # Host setuptools-based packages
>   HOST_PKG_PYTHON_SETUPTOOLS_ENV = \
> -	$(HOST_PKG_PYTHON_ENV) \
> -	SETUPTOOLS_USE_DISTUTILS=stdlib
> +	$(HOST_PKG_PYTHON_ENV)
>   
>   HOST_PKG_PYTHON_SETUPTOOLS_INSTALL_OPTS = \
>   	--prefix=$(HOST_DIR) \



More information about the buildroot mailing list