From patchwork Wed Nov 9 20:21:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 15248 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 356CDC43219 for ; Wed, 9 Nov 2022 20:21:30 +0000 (UTC) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by mx.groups.io with SMTP id smtpd.web12.2167.1668025281396467004 for ; Wed, 09 Nov 2022 12:21:21 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=G6jVgytQ; spf=pass (domain: gmail.com, ip: 209.85.221.42, mailfrom: alex.kanavin@gmail.com) Received: by mail-wr1-f42.google.com with SMTP id a14so27614072wru.5 for ; Wed, 09 Nov 2022 12:21:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=60PZmhRwxsxsvjtukroFkqf5OvXSoqM/GHb0R1bueHo=; b=G6jVgytQ6I8gOGDiznf2qvRHKjKX9D5CKaBmbSSK+cAoKFAQDBTL3yxKZ1APefllWR TO8/GsyO8ncosWbsIrXdN66HNERlE8iWlyJVnqlKkr1H4qDf85Qgzf6+wwb5Ot6Aw44h RkCy7asY90vBgI9Wblhx71QTLRKWebZh7eccDo7UqS6zVBqp1PI7XXvML3qDh0eI/nZu 3UjdUq0OjChs3BxHQoOiju8hKu+JSrONS4DUU1t2agF7TeA6RsC/lpOiYp70EyetRFpa Wmiorbe0Tv9ie/cXWLDHubeZLngMAWozbsaQfIrJAKZCeVG17oZxn4RnjmScYC2iHIOW RzuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=60PZmhRwxsxsvjtukroFkqf5OvXSoqM/GHb0R1bueHo=; b=8I/tucqqBcJu8Uxp9ZcY4ulxxr2dGHEXZdvM4J+YPW3ofQTYmnsjOk+pAKs95OZDG1 Udd63V2yZd7IzNhxUv0WlWrZw2eKR+6BJVMje1xJicYGC3MWdRY0jTQ8t+USD+UVBsGx x/Gp8YlqiUhf5X1sonomVnQOTtBxXzGHI8GRoS6jMSfQxqtDdq1z4A9TVy5MNzvDRwYl AwAtQVTKXuOu+wfDYCfeI0UU+TXqkYH3fsL+uVcdISNUydBZN7tz4da0KDZahgwB5Q+R DmKVk2HnFI6PpCsXaHL2sRwZzcDQ+3gGjHGSuSSTnBqI3oXbZ+Ufpj474FUhqySQfBsx Kf3Q== X-Gm-Message-State: ACrzQf1ZCcImYKAPPteBsweo2sj6guwtgJ/zpNdzM9NscnBh6tSaOMvH oR4izrHtyRcvso0na8ljWQDbKWXJGOw= X-Google-Smtp-Source: AMsMyM5i2toHcX5ivdwmPRM9XuF9WQRIrBkv46pWKyHHpRK965q3KY3g9pIAlJH4P+fNOktRX/A2iA== X-Received: by 2002:a5d:6dca:0:b0:22c:c6f9:57d2 with SMTP id d10-20020a5d6dca000000b0022cc6f957d2mr39768770wrz.474.1668025279641; Wed, 09 Nov 2022 12:21:19 -0800 (PST) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id m3-20020a05600c3b0300b003b4ff30e566sm4168055wms.3.2022.11.09.12.21.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Nov 2022 12:21:19 -0800 (PST) From: Alexander Kanavin X-Google-Original-From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH v2 1/5] python3: correctly adjust include paths in sysconfigdata Date: Wed, 9 Nov 2022 21:21:08 +0100 Message-Id: <20221109202112.2035727-1-alex@linutronix.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 09 Nov 2022 20:21:30 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/173051 This was replacing /usr/include regardless of whether it was at the beginning of the full path (correct, when building target python3), or in the middle of it (not correct, when building native or nativesdk python). Through various reasons we haven't been bitten by this until now, but latest setuptools does expose the problem with for example nativesdk-python3-cffi and nativesdk-python3-cryptography which both fail without this fix. I am not aware of anything using INCLDIRSTOMAKE, and it is harder to adjust correctly due to the value being a list; if something is using it, we can look at it specifically. Signed-off-by: Alexander Kanavin --- meta/recipes-devtools/python/python3_3.11.0.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/recipes-devtools/python/python3_3.11.0.bb b/meta/recipes-devtools/python/python3_3.11.0.bb index 6b6c983abf..92a1f69320 100644 --- a/meta/recipes-devtools/python/python3_3.11.0.bb +++ b/meta/recipes-devtools/python/python3_3.11.0.bb @@ -186,8 +186,8 @@ do_install:append() { -e "s,^ 'LIBDIR'.*, 'LIBDIR': '${STAGING_LIBDIR}'\,,g" \ -e "s,^ 'INCLUDEDIR'.*, 'INCLUDEDIR': '${STAGING_INCDIR}'\,,g" \ -e "s,^ 'CONFINCLUDEDIR'.*, 'CONFINCLUDEDIR': '${STAGING_INCDIR}'\,,g" \ - -e "/^ 'INCLDIRSTOMAKE'/{N; s,/usr/include,${STAGING_INCDIR},g}" \ - -e "/^ 'INCLUDEPY'/s,/usr/include,${STAGING_INCDIR},g" \ + -e "s,^ 'INCLUDEPY'.*, 'INCLUDEPY': '${STAGING_INCDIR}/python${PYTHON_MAJMIN}'\,,g" \ + -e "s,^ 'CONFINCLUDEPY'.*, 'CONFINCLUDEPY': '${STAGING_INCDIR}/python${PYTHON_MAJMIN}'\,,g" \ -e "s,${B},/build/path/unavailable/,g" \ $sysconfigfile cp $sysconfigfile ${D}${libdir}/python-sysconfigdata/_sysconfigdata.py From patchwork Wed Nov 9 20:21:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 15252 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4159FC4167B for ; Wed, 9 Nov 2022 20:21:30 +0000 (UTC) Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by mx.groups.io with SMTP id smtpd.web12.2168.1668025282032805234 for ; Wed, 09 Nov 2022 12:21:22 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=aIEQeS9m; spf=pass (domain: gmail.com, ip: 209.85.221.41, mailfrom: alex.kanavin@gmail.com) Received: by mail-wr1-f41.google.com with SMTP id bs21so27621617wrb.4 for ; Wed, 09 Nov 2022 12:21:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hO9bPZeNB5E6hucvKKebp7pJcCavNWVKwJ6VeyJr7ww=; b=aIEQeS9mUXr3pLqT3oLuk312GqIOgC4mnqoBLhJERDtlskdqjym3SliiBueMSBkIoF GC6jeMEF1CMIsZ7o6dKVroJ3voCjdjr3dAss10uUpgmbzAv7auUwmYQETzPQAKbaqT6x CTVLZbnhztU6Dme33pix9jVu/X0Q0RM5LS2OPe8/rySiwPXpjQNfXQUxO8VbG7+vm44v MfgA99+/OUmKD+6PwijSoRWYcGCUlAOdB8A6Lbm/F7AiLwu+U5labSpGaTgJJe1nOujW 4v/B0NFM23YI/i34tTONG/rZln2chQro4DBy1HcIMReT22ojbcpAZ3NOvrlIUUKN3k73 H7pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hO9bPZeNB5E6hucvKKebp7pJcCavNWVKwJ6VeyJr7ww=; b=h7saq4ct6mxbAOyqbz7C2ruw35fCRRQoVTFQcZn2C9AE8NWe6epu05UjTSAhx4oGLu YJ5Up3/Pj4w3I8z5xjAURYH++uMqSNJ5Y0sBHiLBYVA+H3c0Cqsefl3fjTBx9Yh3inF6 K5WlQTeTWPH5ming4XgYieUhO7U4nuv4+KHd9R69YrYNNGiA88Zz7BN97dj24HXOtEA6 UIJapiu2iCVggNbW0K18SyXmX+1q5nR7pVy/2M6fvbdYwbQ/CALuc8pzhQoMgIJl5A3r yOSe2uz97DH8eME3xyNnsCnNN+6najBI6O8yFsW46HmoTNG1slAx+C0TTiUnic65FP7R BSUQ== X-Gm-Message-State: ACrzQf1sFtiCPUxOUvNsWQlEllaDkWh3F7dVFvzSZmh8SJ8kKo4tt0LB jrohUc9FC++Vwxjq7HTjhxw4fpzLn88= X-Google-Smtp-Source: AMsMyM6O3mODmoLQthLd87SLBubEP5nGavmCVe5PJpobsU15vb4hz9wDQC6u6mhNIo/MkSFJuImFTg== X-Received: by 2002:adf:8bc4:0:b0:236:73b7:84a with SMTP id w4-20020adf8bc4000000b0023673b7084amr39087984wra.8.1668025280416; Wed, 09 Nov 2022 12:21:20 -0800 (PST) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id m3-20020a05600c3b0300b003b4ff30e566sm4168055wms.3.2022.11.09.12.21.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Nov 2022 12:21:20 -0800 (PST) From: Alexander Kanavin X-Google-Original-From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH v2 2/5] python3: use the standard shell version of python3-config Date: Wed, 9 Nov 2022 21:21:09 +0100 Message-Id: <20221109202112.2035727-2-alex@linutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221109202112.2035727-1-alex@linutronix.de> References: <20221109202112.2035727-1-alex@linutronix.de> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 09 Nov 2022 20:21:30 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/173052 There is really no reason why we can't: it only needs to be available in two versions (native/target), and the correct one can be picked via PATH priority order. This eliminates two un-upstreamable patches, one of which relies on soon to be removed distutils. Signed-off-by: Alexander Kanavin --- .../python3targetconfig.bbclass | 17 ++++-- ...shebang-overflow-on-python-config.py.patch | 14 ++--- ...hell-version-of-python-config-that-w.patch | 36 ------------ .../python/python3/python-config.patch | 55 ------------------- .../recipes-devtools/python/python3_3.11.0.bb | 18 +++++- 5 files changed, 33 insertions(+), 107 deletions(-) delete mode 100644 meta/recipes-devtools/python/python3/0001-Do-not-use-the-shell-version-of-python-config-that-w.patch delete mode 100644 meta/recipes-devtools/python/python3/python-config.patch diff --git a/meta/classes-recipe/python3targetconfig.bbclass b/meta/classes-recipe/python3targetconfig.bbclass index 3f89e5e09e..02fdb0c03f 100644 --- a/meta/classes-recipe/python3targetconfig.bbclass +++ b/meta/classes-recipe/python3targetconfig.bbclass @@ -10,26 +10,31 @@ EXTRA_PYTHON_DEPENDS ?= "" EXTRA_PYTHON_DEPENDS:class-target = "python3" DEPENDS:append = " ${EXTRA_PYTHON_DEPENDS}" -do_configure:prepend:class-target() { +setup_target_config() { export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" + export PATH=${STAGING_EXECPREFIXDIR}/python-target-config/:$PATH +} + +do_configure:prepend:class-target() { + setup_target_config } do_compile:prepend:class-target() { - export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" + setup_target_config } do_install:prepend:class-target() { - export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" + setup_target_config } do_configure:prepend:class-nativesdk() { - export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" + setup_target_config } do_compile:prepend:class-nativesdk() { - export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" + setup_target_config } do_install:prepend:class-nativesdk() { - export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" + setup_target_config } diff --git a/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch b/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch index 921da8de7c..db08435004 100644 --- a/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch +++ b/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch @@ -1,7 +1,7 @@ -From f0c9dec63d452a7cd1e15ea653f4aced281f021c Mon Sep 17 00:00:00 2001 +From 78f482b91d94b44a02e02c4580166757119061ea Mon Sep 17 00:00:00 2001 From: Paulo Neves Date: Tue, 7 Jun 2022 16:16:41 +0200 -Subject: [PATCH 1/1] Avoid shebang overflow on python-config.py +Subject: [PATCH] Avoid shebang overflow on python-config.py The whole native path may be too big, leading to shebang overflow. Let's just use the env shebang. @@ -11,15 +11,16 @@ Denial reason: [1] Upstream-Status: Denied [distribution] [1] https://github.com/python/cpython/pull/93760#pullrequestreview-1005365737 + --- Makefile.pre.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile.pre.in b/Makefile.pre.in -index f0aedb76cb58999427804255da56fa53284d7032..dd88e43114730f7681715777cc76dabb31113176 100644 +index 55c7c46..1f6500a 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -1638,6 +1638,8 @@ python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh +@@ -2115,6 +2115,8 @@ python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh @ # Substitution happens here, as the completely-expanded BINDIR @ # is not available in configure sed -e "s,@EXENAME@,$(BINDIR)/python$(LDVERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config.py @@ -27,7 +28,4 @@ index f0aedb76cb58999427804255da56fa53284d7032..dd88e43114730f7681715777cc76dabb + sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' python-config.py @ # Replace makefile compat. variable references with shell script compat. ones; $(VAR) -> ${VAR} LC_ALL=C sed -e 's,\$$(\([A-Za-z0-9_]*\)),\$$\{\1\},g' < Misc/python-config.sh >python-config - @ # In OpenEmbedded, always use the python version of the script, the shell --- -2.25.1 - + @ # On Darwin, always use the python version of the script, the shell diff --git a/meta/recipes-devtools/python/python3/0001-Do-not-use-the-shell-version-of-python-config-that-w.patch b/meta/recipes-devtools/python/python3/0001-Do-not-use-the-shell-version-of-python-config-that-w.patch deleted file mode 100644 index d98f243cb1..0000000000 --- a/meta/recipes-devtools/python/python3/0001-Do-not-use-the-shell-version-of-python-config-that-w.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 2406432449784243b7590009d42bd0e871253b2e Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Tue, 29 Jan 2019 15:03:01 +0100 -Subject: [PATCH] Do not use the shell version of python-config that was - introduced in 3.4 - -Revert instead to the original python version: it has our tweaks and -outputs directories correctly. - -Upstream-Status: Inappropriate [oe-specific] -Signed-off-by: Alexander Kanavin - ---- - Makefile.pre.in | 9 +++------ - 1 file changed, 3 insertions(+), 6 deletions(-) - -diff --git a/Makefile.pre.in b/Makefile.pre.in -index ee85f35..f0aedb7 100644 ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -1640,12 +1640,9 @@ python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh - sed -e "s,@EXENAME@,$(BINDIR)/python$(LDVERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config.py - @ # Replace makefile compat. variable references with shell script compat. ones; $(VAR) -> ${VAR} - LC_ALL=C sed -e 's,\$$(\([A-Za-z0-9_]*\)),\$$\{\1\},g' < Misc/python-config.sh >python-config -- @ # On Darwin, always use the python version of the script, the shell -- @ # version doesn't use the compiler customizations that are provided -- @ # in python (_osx_support.py). -- @if test `uname -s` = Darwin; then \ -- cp python-config.py python-config; \ -- fi -+ @ # In OpenEmbedded, always use the python version of the script, the shell -+ @ # version is broken in multiple ways, and doesn't return correct directories -+ cp python-config.py python-config - - - # Install the include files diff --git a/meta/recipes-devtools/python/python3/python-config.patch b/meta/recipes-devtools/python/python3/python-config.patch deleted file mode 100644 index 4da399e46e..0000000000 --- a/meta/recipes-devtools/python/python3/python-config.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 8632f25ac4e2c53a3c2c8a1b4fc97fc86e8aad5a Mon Sep 17 00:00:00 2001 -From: Tyler Hall -Date: Sun, 4 May 2014 20:06:43 -0400 -Subject: [PATCH] python-config: Revert to using distutils.sysconfig - -The newer sysconfig module shares some code with distutils.sysconfig, but the same modifications as in - -12-distutils-prefix-is-inside-staging-area.patch makes distutils.sysconfig - -affect the native runtime as well as cross building. Use the old, patched -implementation which returns paths in the staging directory and for the target, -as appropriate. - -Upstream-Status: Inappropriate [Embedded Specific] - -Signed-off-by: Tyler Hall - ---- - Misc/python-config.in | 12 +++++++----- - 1 file changed, 7 insertions(+), 5 deletions(-) - -diff --git a/Misc/python-config.in b/Misc/python-config.in -index ebd99da..0492e08 100644 ---- a/Misc/python-config.in -+++ b/Misc/python-config.in -@@ -6,7 +6,9 @@ - import getopt - import os - import sys --import sysconfig -+import warnings -+warnings.filterwarnings("ignore", category=DeprecationWarning) -+from distutils import sysconfig - - valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags', - 'ldflags', 'extension-suffix', 'help', 'abiflags', 'configdir', -@@ -35,14 +37,14 @@ if '--help' in opt_flags: - - for opt in opt_flags: - if opt == '--prefix': -- print(getvar('prefix')) -+ print(sysconfig.PREFIX) - - elif opt == '--exec-prefix': -- print(getvar('exec_prefix')) -+ print(sysconfig.EXEC_PREFIX) - - elif opt in ('--includes', '--cflags'): -- flags = ['-I' + sysconfig.get_path('include'), -- '-I' + sysconfig.get_path('platinclude')] -+ flags = ['-I' + sysconfig.get_python_inc(), -+ '-I' + sysconfig.get_python_inc(plat_specific=True)] - if opt == '--cflags': - flags.extend(getvar('CFLAGS').split()) - print(' '.join(flags)) diff --git a/meta/recipes-devtools/python/python3_3.11.0.bb b/meta/recipes-devtools/python/python3_3.11.0.bb index 92a1f69320..4760895e9f 100644 --- a/meta/recipes-devtools/python/python3_3.11.0.bb +++ b/meta/recipes-devtools/python/python3_3.11.0.bb @@ -16,8 +16,6 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ file://cgi_py.patch \ file://0001-Do-not-add-usr-lib-termcap-to-linker-flags-to-avoid-.patch \ ${@bb.utils.contains('PACKAGECONFIG', 'tk', '', 'file://avoid_warning_about_tkinter.patch', d)} \ - file://0001-Do-not-use-the-shell-version-of-python-config-that-w.patch \ - file://python-config.patch \ file://0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch \ file://0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch \ file://0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch \ @@ -172,6 +170,9 @@ do_install:append:class-native() { # disable the lookup in user's site-packages globally sed -i 's#ENABLE_USER_SITE = None#ENABLE_USER_SITE = False#' ${D}${libdir}/python${PYTHON_MAJMIN}/site.py + + # python3-config needs to be in /usr/bin and not in a subdir of it to work properly + mv ${D}/${bindir}/${PN}/python*config ${D}/${bindir}/ } do_install:append() { @@ -220,6 +221,19 @@ do_install:append:class-nativesdk () { create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN} TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo' PYTHONNOUSERSITE='1' } +SYSROOT_PREPROCESS_FUNCS:append:class-target = " provide_target_config_script" +SYSROOT_PREPROCESS_FUNCS:append:class-nativesdk = " provide_target_config_script" + +# This is installed into /usr/python-target-config/ and not /usr/bin +# because adding target sysroot's /usr/bin/ to PATH has unwanted side effects +# in components erroneously picking up other target executables from it +provide_target_config_script() { + install -d ${SYSROOT_DESTDIR}${prefix}/python-target-config/ + install ${D}/${bindir}/python3-config ${SYSROOT_DESTDIR}/${prefix}/python-target-config/ + install ${D}/${bindir}/python${PYTHON_MAJMIN}-config ${SYSROOT_DESTDIR}/${prefix}/python-target-config/ +} +SYSROOT_DIRS += "${prefix}/python-target-config/" + SSTATE_SCAN_FILES += "Makefile _sysconfigdata.py" SSTATE_HASHEQUIV_FILEMAP = " \ populate_sysroot:*/lib*/python3*/_sysconfigdata*.py:${TMPDIR} \ From patchwork Wed Nov 9 20:21:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 15251 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4131FC43217 for ; Wed, 9 Nov 2022 20:21:30 +0000 (UTC) Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by mx.groups.io with SMTP id smtpd.web09.2043.1668025282637371389 for ; Wed, 09 Nov 2022 12:21:23 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=nBJnXM1r; spf=pass (domain: gmail.com, ip: 209.85.128.41, mailfrom: alex.kanavin@gmail.com) Received: by mail-wm1-f41.google.com with SMTP id t1so11620606wmi.4 for ; Wed, 09 Nov 2022 12:21:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vTUmBrzO8EMtoSKtYMDhnELN8b+oGDsf7XaFjxk4Dwc=; b=nBJnXM1r5JPZVs1ezyKhOoUasTaQcadhMBCTchj36oZA8iGCAuiSQotAIRUrvCK/gW 4EtnCeaQkufCoj/q4qhHiOCMtQ/MYtLado68oYHttwu81KH59fN6y2W/KW8AIVo3abAk cWvNKbIlP6+pJfJXd0zWUauIvy3FlaONB20VVpsxOWREXd4Q6OehnQU3uPmm322KN+dn MGE6BEZUb0ZeWCdw/MLNlEzo1iQcRypmex9MBzynm9ijefCtiZIoccZvXueyuxzIBZ1G CM7lNLbhbZN0rGWBkSBfxsu/BG+9J2OAg0WKxCTV8NZm7bIYXgCTnVMyM8tzKHVPzdev E7PQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vTUmBrzO8EMtoSKtYMDhnELN8b+oGDsf7XaFjxk4Dwc=; b=laVda5NnWLq2Xt3ybqu5H1WODNJTxoHE4NkD86iY9bNb9AvC3mFwr+tXEbLIF32oS2 0+7V+5j4W06Tq+nLMnjjlXZyFK6WuROTMn/Q+Ub+r8eRF4MIVTh1PjhEGQtJZmAFcGQm d9CEA5xVwnrr6hI8NUnALzlgMCJ7UbHiN8LJEabV1IKZ0fUPmMtG7jdo3uKl9WXr6FL8 Qmq4LTnHwNwWyjuXLL9wZU9j6Jp4zuTML3DdPh/t4eJa7RCw+Sccsl9FnAA/bnQyYu9Y R5E1W/x6wwVClY7OytsPwIHJDuyOU75AUWZrzD0SXQKbC/xGv9zmAOh9F+yGxtwSb0Pv A0xg== X-Gm-Message-State: ACrzQf26SWj6a5bT/2RbEjI01aPKwf5xjIv93CH4VvxZ61t2RTRR3ia3 VMIZlYSu+mALV9Wamjgv8ZjwFdn+B9E= X-Google-Smtp-Source: AMsMyM4S9kSD55W37QENZHEYU49luhjhzkmireJSK7Ymv366JL8Od8txEIlLujsFh5OQeRQhYPcEmA== X-Received: by 2002:a05:600c:2d05:b0:3cf:8e60:c223 with SMTP id x5-20020a05600c2d0500b003cf8e60c223mr22563675wmf.188.1668025281063; Wed, 09 Nov 2022 12:21:21 -0800 (PST) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id m3-20020a05600c3b0300b003b4ff30e566sm4168055wms.3.2022.11.09.12.21.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Nov 2022 12:21:20 -0800 (PST) From: Alexander Kanavin X-Google-Original-From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH v2 3/5] python3targetconfig.bbclass: use PYTHONPATH to point to the target config Date: Wed, 9 Nov 2022 21:21:10 +0100 Message-Id: <20221109202112.2035727-3-alex@linutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221109202112.2035727-1-alex@linutronix.de> References: <20221109202112.2035727-1-alex@linutronix.de> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 09 Nov 2022 20:21:30 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/173053 There is no need to patch native python so that it looks in the target sysroot; the same can be achieved with just an environment variable. Signed-off-by: Alexander Kanavin --- .../python3targetconfig.bbclass | 1 + .../classes-recipe/setuptools3_legacy.bbclass | 2 +- ...fig-append-STAGING_LIBDIR-python-sys.patch | 28 ------------------- .../recipes-devtools/python/python3_3.11.0.bb | 1 - 4 files changed, 2 insertions(+), 30 deletions(-) delete mode 100644 meta/recipes-devtools/python/python3/0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch diff --git a/meta/classes-recipe/python3targetconfig.bbclass b/meta/classes-recipe/python3targetconfig.bbclass index 02fdb0c03f..22305fe176 100644 --- a/meta/classes-recipe/python3targetconfig.bbclass +++ b/meta/classes-recipe/python3targetconfig.bbclass @@ -12,6 +12,7 @@ DEPENDS:append = " ${EXTRA_PYTHON_DEPENDS}" setup_target_config() { export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" + export PYTHONPATH=${STAGING_LIBDIR}/python-sysconfigdata export PATH=${STAGING_EXECPREFIXDIR}/python-target-config/:$PATH } diff --git a/meta/classes-recipe/setuptools3_legacy.bbclass b/meta/classes-recipe/setuptools3_legacy.bbclass index 21748f922a..57de956d0a 100644 --- a/meta/classes-recipe/setuptools3_legacy.bbclass +++ b/meta/classes-recipe/setuptools3_legacy.bbclass @@ -49,7 +49,7 @@ setuptools3_legacy_do_install() { install -d ${D}${PYTHON_SITEPACKAGES_DIR} STAGING_INCDIR=${STAGING_INCDIR} \ STAGING_LIBDIR=${STAGING_LIBDIR} \ - PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \ + PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR}:$PYTHONPATH \ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \ build --build-base=${B} install --skip-build ${SETUPTOOLS_INSTALL_ARGS} || \ bbfatal_log "'${PYTHON_PN} setup.py install ${SETUPTOOLS_INSTALL_ARGS}' execution failed." diff --git a/meta/recipes-devtools/python/python3/0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch b/meta/recipes-devtools/python/python3/0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch deleted file mode 100644 index 45a37ed1a9..0000000000 --- a/meta/recipes-devtools/python/python3/0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 9c6b9f46179c8f9c9391767e2b02f268a1ee7a9c Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Thu, 31 Jan 2019 16:46:30 +0100 -Subject: [PATCH] distutils/sysconfig: append - STAGING_LIBDIR/python-sysconfigdata to sys.path - -So that target configuration can be used when running native python - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin - ---- - Lib/sysconfig.py | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py -index ff399e2..95844cf 100644 ---- a/Lib/sysconfig.py -+++ b/Lib/sysconfig.py -@@ -528,6 +528,8 @@ def _init_posix(vars): - """Initialize the module as appropriate for POSIX systems.""" - # _sysconfigdata is generated at build time, see _generate_posix_vars() - name = _get_sysconfigdata_name() -+ if 'STAGING_LIBDIR' in os.environ: -+ sys.path.append(os.environ['STAGING_LIBDIR']+'/python-sysconfigdata') - _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0) - build_time_vars = _temp.build_time_vars - vars.update(build_time_vars) diff --git a/meta/recipes-devtools/python/python3_3.11.0.bb b/meta/recipes-devtools/python/python3_3.11.0.bb index 4760895e9f..94f01af83a 100644 --- a/meta/recipes-devtools/python/python3_3.11.0.bb +++ b/meta/recipes-devtools/python/python3_3.11.0.bb @@ -36,7 +36,6 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ SRC_URI:append:class-native = " \ file://0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch \ - file://0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch \ file://12-distutils-prefix-is-inside-staging-area.patch \ file://0001-Don-t-search-system-for-headers-libraries.patch \ " From patchwork Wed Nov 9 20:21:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 15250 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 34BA3C4332F for ; Wed, 9 Nov 2022 20:21:30 +0000 (UTC) Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) by mx.groups.io with SMTP id smtpd.web11.2114.1668025283227525710 for ; Wed, 09 Nov 2022 12:21:23 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=PPzHL7Wl; spf=pass (domain: gmail.com, ip: 209.85.128.48, mailfrom: alex.kanavin@gmail.com) Received: by mail-wm1-f48.google.com with SMTP id p16so11625092wmc.3 for ; Wed, 09 Nov 2022 12:21:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Q3p08TjgEfxG0l4yiDrya7apRPbIflobJYzMcxwMJrI=; b=PPzHL7WlwWdWsd/XWgCQFKbHPHov7E/Y6MjBwbAbQUP/FfJmakDIp+19njzGeQSDB1 HqMyEANx7TupLEym5mbE3STd9HuQor4/wmJPKmC4wZqldb5C2OvUgnb8+pO6Ip9Uovhk BSm9g2YrZXKpOitH46HbCmR7UP2OZNYm/hBUEjFpgI7WMUaBBbeyKAvhUjnhOYW1jwT2 1hRjlMWkD+NtMFgQJlnUlSiKgw75PY/KfM6WlS7OBPm1QE8gWGKlzD+OvdzP0hskKbFS xfX65AmjsyeffMmPx7AKOBXxP3pE/gba1S/1Wk2HpG9efhSNITEMtv0BnmotM5QJJIWf a7qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Q3p08TjgEfxG0l4yiDrya7apRPbIflobJYzMcxwMJrI=; b=Cws8ytWPxRfniavOM2A5rq/A4WtIZXbIvNPxFZojxaUJZ7/axugVYgoNUudoA1i/Fg 3RUFY9WP+TEf7ezwNP8c3865ionqeWmiaufVCtKWecFCv1280nRa0iNHjQERHcg9azN7 aq0IkL8Z/anmbe07BLYa8xuCwn4D6t4n+SZ3AbaTnYXdPXcOuhcxKnYp2ffFl/+S30sc PFgSMaZc+oWVqgbMtAQqUKLbdtmySF6mNuE1aSmZ7G9F7/rS3dBL2B4Wf35UEOHZX0f7 5B5OviZqPujty2xN5ucPlhAjT4U/eiNYYmbAdv6TXkSnfaZzyrfqs25YWEJ5i2zjXXoW 6bYA== X-Gm-Message-State: ACrzQf2OI4C+QAuAa4VWVnuJYRTF/iJ+xsaOxgLG74aIRS1VngymRIxd L3lW32BPLcWgveWPUUxouF5Ehj2ATAE= X-Google-Smtp-Source: AMsMyM6VOIvS2IDY8Htti3F3dhrVWVEF8aUjWA6n9Cp22HUsK4fm+NWQRbkSVykTROpauwXjAoDZGA== X-Received: by 2002:a1c:7312:0:b0:3cf:6957:1639 with SMTP id d18-20020a1c7312000000b003cf69571639mr39153038wmb.108.1668025281666; Wed, 09 Nov 2022 12:21:21 -0800 (PST) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id m3-20020a05600c3b0300b003b4ff30e566sm4168055wms.3.2022.11.09.12.21.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Nov 2022 12:21:21 -0800 (PST) From: Alexander Kanavin X-Google-Original-From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH v2 4/5] vala: install vapigen-wrapper into /usr/bin/crosscripts and stage only that Date: Wed, 9 Nov 2022 21:21:11 +0100 Message-Id: <20221109202112.2035727-4-alex@linutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221109202112.2035727-1-alex@linutronix.de> References: <20221109202112.2035727-1-alex@linutronix.de> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 09 Nov 2022 20:21:30 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/173055 Staging the whole /usr/bin is not correct, as it pulls in also all the vala's cross binaries, which may be discovered by other recipes and things will go wrong then. Signed-off-by: Alexander Kanavin --- meta/recipes-devtools/vala/vala.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/meta/recipes-devtools/vala/vala.inc b/meta/recipes-devtools/vala/vala.inc index 974baa33f5..d3daee37dc 100644 --- a/meta/recipes-devtools/vala/vala.inc +++ b/meta/recipes-devtools/vala/vala.inc @@ -42,20 +42,20 @@ EXTRA_OECONF += " --disable-valadoc" # Vapigen wrapper needs to be available system-wide, because it will be used # to build vapi files from all other packages with vala support do_install:append:class-target() { - install -d ${D}${bindir}/ - install ${B}/vapigen-wrapper ${D}${bindir}/ + install -d ${D}${bindir_crossscripts}/ + install ${B}/vapigen-wrapper ${D}${bindir_crossscripts}/ } # Put vapigen wrapper into target sysroot so that it can be used when building # vapi files. -SYSROOT_DIRS:append:class-target = " ${bindir}" +SYSROOT_DIRS += "${bindir_crossscripts}" SYSROOT_PREPROCESS_FUNCS:append:class-target = " vapigen_sysroot_preprocess" vapigen_sysroot_preprocess() { # Tweak the vapigen name in the vapigen pkgconfig file, so that it picks # up our wrapper. sed -i \ - -e "s|vapigen=.*|vapigen=${bindir}/vapigen-wrapper|" \ + -e "s|vapigen=.*|vapigen=${bindir_crossscripts}/vapigen-wrapper|" \ ${SYSROOT_DESTDIR}${libdir}/pkgconfig/vapigen-${SHRT_VER}.pc } @@ -64,5 +64,5 @@ SSTATE_SCAN_FILES += "vapigen-wrapper" PACKAGE_PREPROCESS_FUNCS += "vala_package_preprocess" vala_package_preprocess () { - sed -i -e 's:${RECIPE_SYSROOT}::g;' ${PKGD}${bindir}/vapigen-wrapper + sed -i -e 's:${RECIPE_SYSROOT}::g;' ${PKGD}${bindir_crossscripts}/vapigen-wrapper } From patchwork Wed Nov 9 20:21:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 15249 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 33B31C433FE for ; Wed, 9 Nov 2022 20:21:30 +0000 (UTC) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by mx.groups.io with SMTP id smtpd.web12.2167.1668025281396467004 for ; Wed, 09 Nov 2022 12:21:23 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mYshTGLq; spf=pass (domain: gmail.com, ip: 209.85.221.42, mailfrom: alex.kanavin@gmail.com) Received: by mail-wr1-f42.google.com with SMTP id a14so27614204wru.5 for ; Wed, 09 Nov 2022 12:21:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vRgA97ejqrifIAa7gXIk6QrJU8fmmQvH3vVuYHtddnU=; b=mYshTGLqLyffUs4ZN7paI+ensGHcvSWxcChGxdC/ggUkQD55gH5whdyF/3m79ZV9rK 5GXa7ATIZUONEVOzzPwg7FZFAQLsActmGY3zEHomBLMBZr+xPXzcLfMcZGecpBEIfDWC qctQeHjCEbX5WjoMM2BUOoKKprP2j3DCsIzvt/KMz76GS58WZGfvmBj/2o5Yr3qlk1uX HkZj6y5Lk3eIOTEgcp7UZ4ASoGkKAU7raB274ciiM44Y0bpqNr5LE1W9sZn3Po8ibLpa JD+KFGTfKOZcPJb4zrNZLQuC/S4eeWT+ESiWS6siEio4qhSQirlCNaaDlptX1DNVUBl9 JXqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vRgA97ejqrifIAa7gXIk6QrJU8fmmQvH3vVuYHtddnU=; b=UDKyD5yPsVJE3mFWgpQwVjtRA3RkxvIf5rmCSdNW9OXyk30mqE4nlLAtgxxskxBewn zZf4BljZOQUCEUVNBQlkbCOaMKQlBuEmk5Qkl/xVlEfKYGusjsOeIAff+DITpueWuygL f/oQupzHy6Z8p8BCpXes+R+apXmNRhTYCJOUhv5/IceU9CxqxgOxfES0Ybai/eIJ6WYc Dupgk5Hnx7wrFTRjVWOkH5nhoARmGf72rQgs13bXbaCU0QJPtJeAwyLu4ACBtzY3w3gD gca27ajQCsdwKxbSpi3twc7ab7f6FVyDxi4rymlIeLqUsoiRChL8FzO3s1Ri3gN20GEF jHTg== X-Gm-Message-State: ACrzQf1iO2snzTaEdsvyQonbfAcoNnFck3Ys4p6ONwBEJlBpF/soQNm6 ZUfTLj5RkGcYZz3jxAEoqDBXEt3yIdE= X-Google-Smtp-Source: AMsMyM7VlXoP/G2Tx6eT6AbgDdp3cUY6v65Q1IY1euM3TXZXxdCXNsA61PohR9KIYrcVmajGxPDkhQ== X-Received: by 2002:adf:e704:0:b0:23a:1e9a:c554 with SMTP id c4-20020adfe704000000b0023a1e9ac554mr19954751wrm.167.1668025282344; Wed, 09 Nov 2022 12:21:22 -0800 (PST) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id m3-20020a05600c3b0300b003b4ff30e566sm4168055wms.3.2022.11.09.12.21.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Nov 2022 12:21:21 -0800 (PST) From: Alexander Kanavin X-Google-Original-From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH v2 5/5] sanity.bbclass: do not check for presence of distutils Date: Wed, 9 Nov 2022 21:21:12 +0100 Message-Id: <20221109202112.2035727-5-alex@linutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221109202112.2035727-1-alex@linutronix.de> References: <20221109202112.2035727-1-alex@linutronix.de> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 09 Nov 2022 20:21:30 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/173054 This will be removed in 3.12 and has been deprecated for a while. If anything breaks because of its absence on the host, this would expose the breakage so it can be fixed. icu source specifically does not refer to distutils anywhere. Signed-off-by: Alexander Kanavin --- meta/classes-global/sanity.bbclass | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/meta/classes-global/sanity.bbclass b/meta/classes-global/sanity.bbclass index 606444cae1..38f4a4b22f 100644 --- a/meta/classes-global/sanity.bbclass +++ b/meta/classes-global/sanity.bbclass @@ -625,11 +625,9 @@ def check_sanity_version_change(status, d): # never again until the sanity version or host distrubution id/version changes. # Check the python install is complete. Examples that are often removed in - # minimal installations: glib-2.0-natives requries # xml.parsers.expat and icu - # requires distutils.sysconfig. + # minimal installations: glib-2.0-natives requries # xml.parsers.expat try: import xml.parsers.expat - import distutils.sysconfig except ImportError as e: status.addresult('Your Python 3 is not a full install. Please install the module %s (see the Getting Started guide for further information).\n' % e.name)