From patchwork Wed Feb 23 20:07:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 4175 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 F3024C433F5 for ; Wed, 23 Feb 2022 20:07:31 +0000 (UTC) Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by mx.groups.io with SMTP id smtpd.web09.770.1645646850993478646 for ; Wed, 23 Feb 2022 12:07:31 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=ftqrkxCo; spf=pass (domain: linuxfoundation.org, ip: 209.85.128.51, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wm1-f51.google.com with SMTP id c192so14438428wma.4 for ; Wed, 23 Feb 2022 12:07:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=OdQmKa5mPwd8h1sCTryUEI1r04NAj7VcV5ZzVBIdrpg=; b=ftqrkxCosUDH3UQ0xrKL4+oaL3pF6o3imHqq4ZM/y1Mp5V40urtPd/mtngxxcBGd5r bf3FKBBi+SQoCCpk4gAjAJ23M7WAX6S4W7dyTLduT5iqaxlZ9wxEJ53QH/9aoAVnCoFF TAOA7UgODnUhSlJj6xtZYZZDtR+jQkH/Nrqtg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=OdQmKa5mPwd8h1sCTryUEI1r04NAj7VcV5ZzVBIdrpg=; b=CyowqIKbbH09/A22LLewWs0qia5ZBlEdgYaRVIf192RCmqdIT15WG2hzXnhwCXtb8j Zbv/+JpZo/JhG4m/W2ukYXWhayMShSHfYvasFHdlt5tnR9F2IvakPNG8n3NsOZ/0zj01 Ime3jk43Vhy/gATTX6AJ8vnkjHp0T2VjN3sJH1iBCrMgWSR+xoPChiDjLfxCW6cwWfsq 4K1x83qv9u7uFjxxgMoXV0tVYMOvPyDoCi1N5WvwcCX/hk0F+r1dVbr+pLi/SsufuGEj 9o8Wglopww5WurVE6LQOIPIQz4roYeRykxl0bcHqgyRiRHZHPufTK1pl0ZftUViEaHsM 5u4g== X-Gm-Message-State: AOAM532uWnGEO5zR2mgA9GLBlM7W3+ALUE8yHVCzqCHzOBapQTj5s8dC AXqpRgXc3U6lPj5Jf2l951uC1XI/cedw1frO X-Google-Smtp-Source: ABdhPJzoUS3i1lcUqNywqZRr96HK/KEDWr4aOYj626riUqyvu3xl2OsfofY+cof5HJqyGqmHk8eZ3A== X-Received: by 2002:a7b:c853:0:b0:380:e16c:19e7 with SMTP id c19-20020a7bc853000000b00380e16c19e7mr6860457wml.172.1645646848928; Wed, 23 Feb 2022 12:07:28 -0800 (PST) Received: from hex.int.rpsys.net ([2001:8b0:aba:5f3c:4709:85d1:7b5:8346]) by smtp.gmail.com with ESMTPSA id w13sm532435wrv.21.2022.02.23.12.07.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 12:07:28 -0800 (PST) From: Richard Purdie To: openembedded-core@lists.openembedded.org Subject: [PATCH 1/3] pip_install_wheel: Use --ignore-installed for pip Date: Wed, 23 Feb 2022 20:07:24 +0000 Message-Id: <20220223200726.3279678-1-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 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, 23 Feb 2022 20:07:31 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/162274 Replace the use of --force-reinstall with --ignore-installed when running pip install. It can detect currently installed modules in the wrong environment and try to remove them currently which is not what is desired. Ignoring them is the correct thing to do. Signed-off-by: Richard Purdie --- meta/classes/pip_install_wheel.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes/pip_install_wheel.bbclass b/meta/classes/pip_install_wheel.bbclass index 70f47d6f79c..f0312e0b1eb 100644 --- a/meta/classes/pip_install_wheel.bbclass +++ b/meta/classes/pip_install_wheel.bbclass @@ -6,7 +6,7 @@ PYPA_WHEEL ??= "${PIP_INSTALL_DIST_PATH}/${PIP_INSTALL_PACKAGE}-${PV}-*.whl" PIP_INSTALL_ARGS ?= "\ -vvvv \ - --force-reinstall \ + --ignore-installed \ --no-cache \ --no-deps \ --no-index \ From patchwork Wed Feb 23 20:07:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 4177 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 DB33FC433EF for ; Wed, 23 Feb 2022 20:07:32 +0000 (UTC) Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by mx.groups.io with SMTP id smtpd.web10.744.1645646851750423160 for ; Wed, 23 Feb 2022 12:07:32 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=ZU3EL1CR; spf=pass (domain: linuxfoundation.org, ip: 209.85.221.48, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wr1-f48.google.com with SMTP id f17so16595781wrh.7 for ; Wed, 23 Feb 2022 12:07:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=9Xf1e2/BvnLDKiCKT/yMJI8DBMwV/9qfYIbAud8TvoE=; b=ZU3EL1CRfO6MGLHlLzrlgFM1PyCnS/BZhSyijJZmbEzpApuBVttqakVUlqsMgGZoAD DqeJJUaO/PGyAsrYXPDoX6850NsovTiRhTNgoL22Jr9fUxfxBAci2p7ieYbkNmIle5p8 /k/q1sym5HLOJh6qrw31hscZqUQk3J5tZltbU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9Xf1e2/BvnLDKiCKT/yMJI8DBMwV/9qfYIbAud8TvoE=; b=vlMtjbdUxCtqE1jsFZj3DNX6SddBXBmuR8ak1iZtEq3osLfg+RPQhZ1BCqAQAEl2OS 035TTH3XiAl1L3bYTuv7zANUfGXxR++60xBIiw7GMlKl+X/HB4ba1LjS5n8drMlwUavs 0HMoT0Q37tm8P+2TA8RoW8S5sc6hmaqeBt+2ZuipfiUehyllYNR+oDERFSR9+Oi2JwIh esSRb7OPMOY4r4g7L032dxmOmpep7ERgOY4VSlRW6beW0ZXWub7fLPz1KRkbhKKPhtfO j+4b4RecA2NvvW9i8cLtnGBIDAkGeo8PU4v0+iHwFjx+rJbUEanpx7d10UguY5fRShyN aQrQ== X-Gm-Message-State: AOAM531ErfLXNmpeoOf7ldrLS1sVVFpr2pjSyp2VTpn8vSyg1T64ECTC uE8eGrCCogWAtEH+J84Gd6tP9WQDxft/TObC X-Google-Smtp-Source: ABdhPJyzxTBe47j9n6jMi89xSH4NgHPtget9NlrsvLyxMpgB3SRliNv+3G2WPb4LklHe5aMEHsLWVw== X-Received: by 2002:a5d:53cb:0:b0:1e7:5e87:9c6c with SMTP id a11-20020a5d53cb000000b001e75e879c6cmr934750wrw.696.1645646849678; Wed, 23 Feb 2022 12:07:29 -0800 (PST) Received: from hex.int.rpsys.net ([2001:8b0:aba:5f3c:4709:85d1:7b5:8346]) by smtp.gmail.com with ESMTPSA id w13sm532435wrv.21.2022.02.23.12.07.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 12:07:29 -0800 (PST) From: Richard Purdie To: openembedded-core@lists.openembedded.org Subject: [PATCH 2/3] python3-pip: Don't change shebang Date: Wed, 23 Feb 2022 20:07:25 +0000 Message-Id: <20220223200726.3279678-2-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220223200726.3279678-1-richard.purdie@linuxfoundation.org> References: <20220223200726.3279678-1-richard.purdie@linuxfoundation.org> 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, 23 Feb 2022 20:07:32 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/162275 Patch pip to disable shebang mangling and also force the python executable to be python3 from the environment when building anything for the target (or nativesdk). Signed-off-by: Richard Purdie --- .../python3-pip/no_shebang_mangling.patch | 24 +++++++++++++++++++ .../python/python3-pip_22.0.3.bb | 1 + 2 files changed, 25 insertions(+) create mode 100644 meta/recipes-devtools/python/python3-pip/no_shebang_mangling.patch diff --git a/meta/recipes-devtools/python/python3-pip/no_shebang_mangling.patch b/meta/recipes-devtools/python/python3-pip/no_shebang_mangling.patch new file mode 100644 index 00000000000..e4dfcbcf843 --- /dev/null +++ b/meta/recipes-devtools/python/python3-pip/no_shebang_mangling.patch @@ -0,0 +1,24 @@ +Upstream-Status: Inappropriate [OE specific config] + +Index: pip-22.0.3/src/pip/_vendor/distlib/scripts.py +=================================================================== +--- pip-22.0.3.orig/src/pip/_vendor/distlib/scripts.py ++++ pip-22.0.3/src/pip/_vendor/distlib/scripts.py +@@ -135,6 +135,8 @@ class ScriptMaker(object): + See also: http://www.in-ulm.de/~mascheck/various/shebang/#length + https://hg.mozilla.org/mozilla-central/file/tip/mach + """ ++ if '_PYTHON_SYSCONFIGDATA_NAME' in os.environ: ++ return b'#!/usr/bin/env python3' + if os.name != 'posix': + simple_shebang = True + else: +@@ -340,7 +342,7 @@ class ScriptMaker(object): + return + + match = FIRST_LINE_RE.match(first_line.replace(b'\r\n', b'\n')) +- if match: ++ if False: + adjust = True + post_interp = match.group(1) or b'' + diff --git a/meta/recipes-devtools/python/python3-pip_22.0.3.bb b/meta/recipes-devtools/python/python3-pip_22.0.3.bb index c4671f50175..023ab41810d 100644 --- a/meta/recipes-devtools/python/python3-pip_22.0.3.bb +++ b/meta/recipes-devtools/python/python3-pip_22.0.3.bb @@ -13,6 +13,7 @@ DEPENDS:remove:class-native = "python3-pip-native" DEPENDS:append:class-native = " unzip-native" SRC_URI += "file://0001-change-shebang-to-python3.patch" +SRC_URI += "file://no_shebang_mangling.patch" SRC_URI[sha256sum] = "f29d589df8c8ab99c060e68ad294c4a9ed896624f6368c5349d70aa581b333d0" From patchwork Wed Feb 23 20:07:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 4176 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 D9467C433FE for ; Wed, 23 Feb 2022 20:07:33 +0000 (UTC) Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by mx.groups.io with SMTP id smtpd.web12.776.1645646852406471376 for ; Wed, 23 Feb 2022 12:07:32 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=WBC9X/P/; spf=pass (domain: linuxfoundation.org, ip: 209.85.221.53, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wr1-f53.google.com with SMTP id l13so454159wrt.2 for ; Wed, 23 Feb 2022 12:07:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=CEq9EsLddJEVb6LU2F3x3fJsQISwfLkJ0zfRl2HpcMQ=; b=WBC9X/P/buVCICpFqo98/VwpRocztktpkvn/YI88I/YuTEIZ85RU+4YKA7U/7CCag5 6ePg1N6ph7ujztuUXg8xGAyrXki6FeXG6ALoXksHAgCCDdBsH/wBtjCCwRtoepVVuY4W d16y6/8wGHAnLMybXbqUxRtOD0O54JcTvg1Rw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CEq9EsLddJEVb6LU2F3x3fJsQISwfLkJ0zfRl2HpcMQ=; b=dsRS32vz6WkyuQtfSdLWajcIwMiEIcqNHeLsYoYhWWaZuELSUs3BDCOAUoRYQbmnWx l/XpAgRdEmP7cm9uY3Mq3Yew/Ybwx7hQskQt7uCAm/+5YG0axYR/QKRA/L+EoAY7NmQU MI+PaJx8nvtDcN0T3/7JWHz91bWaOiyxfynpzQ5LvQ67eHff2easvZ8pogQnnT+p6p91 SnmALNw6zq+H5AntnaZuVTOWN+VoGsvjhItM7W9HIpt/PjCxqWpHbDUjgyY30qGKiueb 1YOjs2toZmxzMFHvvobbgH0Z5V+Bw9AjPJw8BuvL5qeXQug9XhcasjlKy3F7MZyXfE6m oMJQ== X-Gm-Message-State: AOAM531tsMdztzEs07pDIwvEnht1ngch/+vOYxNE+wSBjKoxFFHbHdTL A5A7+wbPJxBTs4kwDkjAU4DtPzAdouXa5kav X-Google-Smtp-Source: ABdhPJx/b8/kjDD26zUjd8EH5srUwHEYgVxCcHhB5K6qMPjAkhyVjxBhYNKFeaqrBkWRYU9daag2cw== X-Received: by 2002:a5d:628b:0:b0:1ed:a09b:aea9 with SMTP id k11-20020a5d628b000000b001eda09baea9mr932637wru.565.1645646850732; Wed, 23 Feb 2022 12:07:30 -0800 (PST) Received: from hex.int.rpsys.net ([2001:8b0:aba:5f3c:4709:85d1:7b5:8346]) by smtp.gmail.com with ESMTPSA id w13sm532435wrv.21.2022.02.23.12.07.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 12:07:30 -0800 (PST) From: Richard Purdie To: openembedded-core@lists.openembedded.org Subject: [PATCH 3/3] python3targetconfig: Use for nativesdk too Date: Wed, 23 Feb 2022 20:07:26 +0000 Message-Id: <20220223200726.3279678-3-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220223200726.3279678-1-richard.purdie@linuxfoundation.org> References: <20220223200726.3279678-1-richard.purdie@linuxfoundation.org> 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, 23 Feb 2022 20:07:33 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/162276 nativesdk is a cross compiled target and therefore should use the target config, not the native one. Copy the target entries accordingly. Signed-off-by: Richard Purdie --- meta/classes/python3targetconfig.bbclass | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/meta/classes/python3targetconfig.bbclass b/meta/classes/python3targetconfig.bbclass index 5c8457acaac..2476858caeb 100644 --- a/meta/classes/python3targetconfig.bbclass +++ b/meta/classes/python3targetconfig.bbclass @@ -15,3 +15,15 @@ do_compile:prepend:class-target() { do_install:prepend:class-target() { export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" } + +do_configure:prepend:class-nativesdk() { + export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" +} + +do_compile:prepend:class-nativesdk() { + export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" +} + +do_install:prepend:class-nativesdk() { + export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" +}