From patchwork Wed Feb 23 22:09:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tim Orling X-Patchwork-Id: 14161 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org From: "Tim Orling" Subject: [PATCH 1/4] python3-pip-native: install scripts in ${bindir} Date: Wed, 23 Feb 2022 14:09:10 -0800 Message-Id: <20220223220913.2057644-1-tim.orling@konsulko.com> MIME-Version: 1.0 List-id: To: openembedded-core@lists.openembedded.org Cc: Tim Orling The naïve approach of simply unzipping the built wheel is not sufficient. 'pip install' would normally have created the [console_scripts] from entry-points.txt in ${D}${bindir}. For bootstrapping purposes, hardcode the scripts and install them into ${D}${bindir}. Skip the ${bindir}/pip variant. [YOCTO #14739] Signed-off-by: Tim Orling --- .../python/python3-pip_22.0.3.bb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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 482a210ee99..5a77cb72d70 100644 --- a/meta/recipes-devtools/python/python3-pip_22.0.3.bb +++ b/meta/recipes-devtools/python/python3-pip_22.0.3.bb @@ -23,6 +23,23 @@ do_install:class-native() { install -d ${D}${PYTHON_SITEPACKAGES_DIR} unzip -d ${D}${PYTHON_SITEPACKAGES_DIR} ${PYPA_WHEEL} || \ bbfatal_log "Failed to unzip wheel: ${PYPA_WHEEL}. Check the logs." + + # pip install would normally generate [console_scripts] in ${bindir} + install -d ${D}/${bindir} + # We will skip the ${bindir}/pip variant as we would just remove it in the do_install:append + cat << EOF >> ${D}/${bindir}/pip3 | tee ${D}/${bindir}/pip${PYTHON_BASEVERSION} +#!/bin/sh +'''exec' ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} "\$0" "\$@" +' ''' +# -*- coding: utf-8 -*- +import re +import sys +from pip._internal.cli.main import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) +EOF + chmod 0755 ${D}${bindir}/pip3 ${D}${bindir}/pip${PYTHON_BASEVERSION} } do_install:append() { From patchwork Wed Feb 23 22:09:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Orling X-Patchwork-Id: 4178 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 3DE08C433F5 for ; Wed, 23 Feb 2022 22:09:27 +0000 (UTC) Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) by mx.groups.io with SMTP id smtpd.web09.2372.1645654166308816429 for ; Wed, 23 Feb 2022 14:09:26 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=GcBFnLA7; spf=pass (domain: gmail.com, ip: 209.85.216.46, mailfrom: ticotimo@gmail.com) Received: by mail-pj1-f46.google.com with SMTP id m13-20020a17090aab0d00b001bbe267d4d1so4464546pjq.0 for ; Wed, 23 Feb 2022 14:09:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2XS6aTgAhUVyT5Vb36/Su4CJvd33fwxXR+B4iPESTb4=; b=GcBFnLA7kFqyXFdDKRMLHn/l+M6l0k3v265AFclcu9peCRtTwIZIpEzTt5PiyyBhrm l07PRWoFTHFKfE1Rd8OIEY7x7qVWz4eZock2VFJoqDOtIMkc+mqwTLOy/aZo8+5fImbG /BFtDeaukC00xdRRso8wBh/TA/hgBiqnHH95iBbHEK6LeL8i71Fx1Kkr7dOSnvGj+Muj BlLHmWG9TxKmpJzBqsVXTEOAxFvP+BZkxQlH1va4nygk9v+e2T5o1Oj7U95MbzT5ZW3y C6DbARv8kiEz3Oxl670KHyi4xzT7ppjity/cOm3mstPIt6p53ghnpgcbgI3r+t3SBDd2 XAAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2XS6aTgAhUVyT5Vb36/Su4CJvd33fwxXR+B4iPESTb4=; b=Uf25Tbmd5I9mnw8YkCM4RkQ4TDcplWfLBFomwrayQEhbL9y1w2Zq6UbAZstpAIht46 AZwkNdlbJr71m7XVpPz4rtyIekdeeG6fDJWMFrgwMJV8ber+RfGs5DgzFCyxBvIKWAME 7foHIkdrL6vqMb6fxTqWE3JpqVsudZK22VLZvxZuJrku+W12W8Yd7quj0nol1//WFmOO mCLj/KDC16WAvib4LTrZk0qemd3HAPRBfW0R7pydLINHesE/0OtNwVHd99g7ngGatOHD iGixcd5cKGpIV892G/v3a23UPINlD9j81BThuGD8p+C/bE3JEXr39seNfU6Mxj3eWqXp /v8w== X-Gm-Message-State: AOAM530wtjEDO/EHIZZTYlE6oZVKZAd3Ok2UsnPCDTIQvsBO5DcOfjd0 GXFKi2J/gAS9TjP8gFASsTF6UQTgkWY8oA== X-Google-Smtp-Source: ABdhPJxZbZ6fL1k61BEpp14BKG75YHche5JrF1WwfOICvIoLVBZbSijAYPX67VuhNSs3PUwMfyLrNw== X-Received: by 2002:a17:902:8497:b0:14f:919:9fdd with SMTP id c23-20020a170902849700b0014f09199fddmr1841319plo.52.1645654165263; Wed, 23 Feb 2022 14:09:25 -0800 (PST) Received: from nereus.hsd1.or.comcast.net ([2601:1c0:6000:1b20:16be:5024:1d60:b2cd]) by smtp.gmail.com with ESMTPSA id i3sm454465pgq.65.2022.02.23.14.09.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 14:09:24 -0800 (PST) From: Tim Orling X-Google-Original-From: Tim Orling To: openembedded-core@lists.openembedded.org Cc: Tim Orling Subject: [PATCH 2/4] python3-scons-native: drop from maintainers.inc Date: Wed, 23 Feb 2022 14:09:11 -0800 Message-Id: <20220223220913.2057644-2-tim.orling@konsulko.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220223220913.2057644-1-tim.orling@konsulko.com> References: <20220223220913.2057644-1-tim.orling@konsulko.com> 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 22:09:27 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/162278 The python3-scons and python3-scons-native recipes have been merged into one. Signed-off-by: Tim Orling --- meta/conf/distro/include/maintainers.inc | 1 - 1 file changed, 1 deletion(-) diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc index 333685cd8b8..3fceb6701bb 100644 --- a/meta/conf/distro/include/maintainers.inc +++ b/meta/conf/distro/include/maintainers.inc @@ -635,7 +635,6 @@ RECIPE_MAINTAINER:pn-python3-rfc3986-validator = "Bruce Ashfield X-Patchwork-Id: 4179 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 2E8A6C433EF for ; Wed, 23 Feb 2022 22:09:29 +0000 (UTC) Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) by mx.groups.io with SMTP id smtpd.web09.2373.1645654168217776865 for ; Wed, 23 Feb 2022 14:09:28 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=MUc2evs7; spf=pass (domain: gmail.com, ip: 209.85.216.47, mailfrom: ticotimo@gmail.com) Received: by mail-pj1-f47.google.com with SMTP id gi6so273106pjb.1 for ; Wed, 23 Feb 2022 14:09:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AMyiqvnqU0saM0kuZ4epVmfcBaXHP2UEUfD/Pu9PW54=; b=MUc2evs7+IKoCloUjG/D615dVvz7pOvvb/byNYBeCZRtsyMHFVFbHHuTO/aaMM0CON TS4UMViQQNctWqsOfepHG3tfaU/tHf4i7LB9QNDHJyOsDarAqh3FHUncEQC+6l9l6CKl Mu9FC5tkSUCx/5XP0lmqPZhHpgU8euyj9LF/qSSv4eWSS0YFMvuuxZaV0UTSQCVVXg1y MwnkhlSI2npCw3uCDEzi0lOCADDJTJkFSsC62gTlySKRaEQ7oqarcTOuE2nZV5nTxdOl 7mOcMXQdjePTm5j6taDFo6k/ZVbASZyhW3Gy9Zvd/DOol9FEuqq7fyQ4GC/GkztU4Ycz W1fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AMyiqvnqU0saM0kuZ4epVmfcBaXHP2UEUfD/Pu9PW54=; b=6MTzGqfLyI54UuliLNEQERrM/75x9ZEckdfBCJpep7SJ5MecK4H4AIXLPd3nnaglK0 L97TSoksOLuP++oNIYa6me/Upih7/B/D+JyDHJfo55iE2g6PtraXv22T4W/pYWkCKOTE t0iB7vsPyOgbNZG69cLsxN60ExJQ6j/iKqIe3rx9X6sjoWB652/bi+T+6ogkAyoAMUAL HY2rsHVhKjNPLZDnev7hK8E0wvYvPj/L0AqflguvJGqe9aoUqobYasNc2IPt6FcnGJ+G vPUXsUkCR7baeIwPno/GyK6QhgZLUHU5U7O7FndiN8HeIMw/1SSy1oIyQ9HEsH6HwXSY qO5g== X-Gm-Message-State: AOAM530BCx2V6jTdaI5yncmsbn3gS8MKyS5YxebYUJANS8ENG/FQuSmO Bu0FEGa5whxhYNs2aVaN4E03qMH0o2XlGw== X-Google-Smtp-Source: ABdhPJyHc8IsydBK8vRGTTpe4SjSmNd5fOLuvwbVWkqA/9EmHg0O0W0c6czsdkGEB5Nl468NfyLMOA== X-Received: by 2002:a17:902:c945:b0:14d:7a50:8746 with SMTP id i5-20020a170902c94500b0014d7a508746mr1782122pla.31.1645654167201; Wed, 23 Feb 2022 14:09:27 -0800 (PST) Received: from nereus.hsd1.or.comcast.net ([2601:1c0:6000:1b20:16be:5024:1d60:b2cd]) by smtp.gmail.com with ESMTPSA id i3sm454465pgq.65.2022.02.23.14.09.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 14:09:26 -0800 (PST) From: Tim Orling X-Google-Original-From: Tim Orling To: openembedded-core@lists.openembedded.org Cc: Tim Orling Subject: [PATCH 3/4] python3-flit-core: SUMMARY DESCRIPTION HOMEPAGE Date: Wed, 23 Feb 2022 14:09:12 -0800 Message-Id: <20220223220913.2057644-3-tim.orling@konsulko.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220223220913.2057644-1-tim.orling@konsulko.com> References: <20220223220913.2057644-1-tim.orling@konsulko.com> 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 22:09:29 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/162279 Add SUMMARY DESCRIPTION HOMEPAGE and BUGTRACKER definitions. Signed-off-by: Tim Orling --- meta/recipes-devtools/python/python3-flit-core_3.6.0.bb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meta/recipes-devtools/python/python3-flit-core_3.6.0.bb b/meta/recipes-devtools/python/python3-flit-core_3.6.0.bb index d0b88c3fa50..6dfacafd31c 100644 --- a/meta/recipes-devtools/python/python3-flit-core_3.6.0.bb +++ b/meta/recipes-devtools/python/python3-flit-core_3.6.0.bb @@ -1,3 +1,10 @@ +SUMMARY = "This provides a PEP 517 build backend for packages using Flit." +DESCRIPTION = "This provides a PEP 517 build backend for packages using \ +Flit. The only public interface is the API specified by PEP 517, at \ +flit_core.buildapi." +HOMEPAGE = "https://github.com/pypa/flit" +BUGTRACKER = "https://github.com/pypa/flit/issues" + LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=41eb78fa8a872983a882c694a8305f08" From patchwork Wed Feb 23 22:09:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tim Orling X-Patchwork-Id: 14162 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org From: "Tim Orling" Subject: [PATCH 4/4] python3-wheel-native: install ${bindir}/wheel Date: Wed, 23 Feb 2022 14:09:13 -0800 Message-Id: <20220223220913.2057644-4-tim.orling@konsulko.com> In-Reply-To: <20220223220913.2057644-1-tim.orling@konsulko.com> References: <20220223220913.2057644-1-tim.orling@konsulko.com> MIME-Version: 1.0 List-id: To: openembedded-core@lists.openembedded.org Cc: Tim Orling pip install would normally install [project.scripts] to ${D}${bindir} but our naïve bootstrapping only unzipps the wheel to ${D}${PYTHON_SITEPACKAGES_DIR}. Correct this by creating the equivalent script in do_install:class-native [YOCTO #14739] Signed-off-by: Tim Orling --- .../python/python3-wheel_0.37.1.bb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/meta/recipes-devtools/python/python3-wheel_0.37.1.bb b/meta/recipes-devtools/python/python3-wheel_0.37.1.bb index c7354c9d982..91bff825097 100644 --- a/meta/recipes-devtools/python/python3-wheel_0.37.1.bb +++ b/meta/recipes-devtools/python/python3-wheel_0.37.1.bb @@ -18,6 +18,22 @@ do_install:class-native () { PYPA_WHEEL="${B}/dist/${PYPI_PACKAGE}-${PV}-*.whl" unzip -d ${D}${PYTHON_SITEPACKAGES_DIR} ${PYPA_WHEEL} || \ bbfatal_log "Failed to install" + + # pip install would normally generate [project.scripts] in ${bindir} + install -d ${D}/${bindir} + cat << EOF >> ${D}/${bindir}/wheel +#!/bin/sh +'''exec' ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} "\$0" "\$@" +' ''' +# -*- coding: utf-8 -*- +import re +import sys +from wheel.cli import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) +EOF + chmod 0755 ${D}${bindir}/wheel } BBCLASSEXTEND = "native nativesdk"