From patchwork Tue Nov 5 16:12:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 51827 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 3C354D2B950 for ; Tue, 5 Nov 2024 16:12:43 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.23940.1730823156430749988 for ; Tue, 05 Nov 2024 08:12:36 -0800 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AC3A0FEC for ; Tue, 5 Nov 2024 08:13:05 -0800 (PST) Received: from cesw-amp-gbt-1s-m12830-04.oss.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 7A3233F6A8 for ; Tue, 5 Nov 2024 08:12:35 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 3/5] python3-cython: inherit cython Date: Tue, 5 Nov 2024 16:12:25 +0000 Message-Id: <20241105161227.2324296-3-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241105161227.2324296-1-ross.burton@arm.com> References: <20241105161227.2324296-1-ross.burton@arm.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 ; Tue, 05 Nov 2024 16:12:43 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/206720 As cython is partially built with cython, inherit the cython class and remove the now redundant fixup functions. Also remove the env fix, as the binaries in $bindir are generated by distutils so use the right hashbang. Signed-off-by: Ross Burton --- .../python/python3-cython_3.0.11.bb | 32 +++---------------- 1 file changed, 5 insertions(+), 27 deletions(-) diff --git a/meta/recipes-devtools/python/python3-cython_3.0.11.bb b/meta/recipes-devtools/python/python3-cython_3.0.11.bb index 57e7848f96c..81ee1b799cb 100644 --- a/meta/recipes-devtools/python/python3-cython_3.0.11.bb +++ b/meta/recipes-devtools/python/python3-cython_3.0.11.bb @@ -10,7 +10,11 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=61c3ee8961575861fa86c7e62bc9f69c" SRC_URI += "file://0001-WIP-prefix-map.patch" SRC_URI[sha256sum] = "7146dd2af8682b4ca61331851e6aebce9fe5158e75300343f80c07ca80b1faff" -inherit pypi setuptools3 +inherit pypi setuptools3 cython + +# No need to depend on self +DEPENDS:remove = "python3-cython-native" + UPSTREAM_CHECK_PYPI_PACKAGE = "Cython" # running build_ext a second time during install fails, because Python @@ -19,38 +23,12 @@ UPSTREAM_CHECK_PYPI_PACKAGE = "Cython" SETUPTOOLS_INSTALL_ARGS += "--skip-build" do_install:append() { - # Make sure we use /usr/bin/env python3 - for PYTHSCRIPT in `grep -rIl '^#!.*python' ${D}`; do - sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT - done - - # remove build paths from generated sources - sed -i -e 's|${WORKDIR}||' ${S}/Cython/*.c ${S}/Cython/Compiler/*.c ${S}/Cython/Plex/*.c - # rename scripts that would conflict with the Python 2 build of Cython mv ${D}${bindir}/cython ${D}${bindir}/cython3 mv ${D}${bindir}/cythonize ${D}${bindir}/cythonize3 mv ${D}${bindir}/cygdb ${D}${bindir}/cygdb3 } -PACKAGESPLITFUNCS =+ "cython_fix_sources" - -cython_fix_sources () { - for f in ${PKGD}${TARGET_DBGSRC_DIR}/Cython/Compiler/FlowControl.c \ - ${PKGD}${TARGET_DBGSRC_DIR}/Cython/Compiler/FusedNode.c \ - ${PKGD}${TARGET_DBGSRC_DIR}/Cython/Compiler/Scanning.c \ - ${PKGD}${TARGET_DBGSRC_DIR}/Cython/Compiler/Visitor.c \ - ${PKGD}${TARGET_DBGSRC_DIR}/Cython/Plex/Actions.c \ - ${PKGD}${TARGET_DBGSRC_DIR}/Cython/Plex/Scanners.c \ - ${PKGD}${TARGET_DBGSRC_DIR}/Cython/Runtime/refnanny.c \ - ${PKGD}${TARGET_DBGSRC_DIR}/Cython/Tempita/_tempita.c \ - ${PKGD}${libdir}/${PYTHON_DIR}/site-packages/Cython*/SOURCES.txt; do - if [ -e $f ]; then - sed -i -e 's#${WORKDIR}/cython-${PV}#${TARGET_DBGSRC_DIR}#g' $f - fi - done -} - RDEPENDS:${PN}:class-target += "\ python3-misc \ python3-netserver \