python3-cython: remove redundant .inc file

There is no python-cython recipe in core, so merge the .bb and .inc.

(From OE-Core rev: 6c2cf318289cbd8c2732f8f7ddaa6750ab0f0276)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ross Burton 2024-06-06 17:20:15 +00:00 committed by Richard Purdie
parent 4928c4806f
commit 46c0ed2fad
2 changed files with 42 additions and 50 deletions

View File

@ -1,45 +0,0 @@
SUMMARY = "The Cython language"
HOMEPAGE = "https://pypi.org/project/Cython/"
DESCRIPTION = "Cython is a language specially designed for writing Python extension modules. \
It's designed to bridge the gap between the nice, high-level, easy-to-use world of Python \
and the messy, low-level world of C."
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=61c3ee8961575861fa86c7e62bc9f69c"
PYPI_PACKAGE = "Cython"
BBCLASSEXTEND = "native nativesdk"
SRC_URI[sha256sum] = "dcc96739331fb854dcf503f94607576cfe8488066c61ca50dfd55836f132de99"
UPSTREAM_CHECK_REGEX = "Cython-(?P<pver>.*)\.tar"
inherit pypi
RDEPENDS:${PN}:class-target += "\
python3-misc \
python3-netserver \
python3-pkgutil \
python3-pyparsing \
python3-setuptools \
python3-shell \
python3-xml \
"
RDEPENDS:${PN}:class-nativesdk += "\
nativesdk-python3-misc \
nativesdk-python3-netserver \
nativesdk-python3-pkgutil \
nativesdk-python3-pyparsing \
nativesdk-python3-setuptools \
nativesdk-python3-shell \
nativesdk-python3-xml \
"
do_install:append() {
# Make sure we use /usr/bin/env python
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
}

View File

@ -1,9 +1,17 @@
inherit setuptools3
require python-cython.inc
SUMMARY = "The Cython language"
HOMEPAGE = "https://pypi.org/project/Cython/"
DESCRIPTION = "Cython is a language specially designed for writing Python extension modules. \
It's designed to bridge the gap between the nice, high-level, easy-to-use world of Python \
and the messy, low-level world of C."
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=61c3ee8961575861fa86c7e62bc9f69c"
PYPI_PACKAGE = "Cython"
RDEPENDS:${PN} += "\
python3-setuptools \
"
SRC_URI[sha256sum] = "dcc96739331fb854dcf503f94607576cfe8488066c61ca50dfd55836f132de99"
UPSTREAM_CHECK_REGEX = "Cython-(?P<pver>.*)\.tar"
inherit pypi setuptools3
# running build_ext a second time during install fails, because Python
# would then attempt to import cythonized modules built for the target
@ -11,6 +19,14 @@ RDEPENDS:${PN} += "\
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
@ -35,3 +51,24 @@ cython_fix_sources () {
done
}
RDEPENDS:${PN}:class-target += "\
python3-misc \
python3-netserver \
python3-pkgutil \
python3-pyparsing \
python3-setuptools \
python3-shell \
python3-xml \
"
RDEPENDS:${PN}:class-nativesdk += "\
nativesdk-python3-misc \
nativesdk-python3-netserver \
nativesdk-python3-pkgutil \
nativesdk-python3-pyparsing \
nativesdk-python3-setuptools \
nativesdk-python3-shell \
nativesdk-python3-xml \
"
BBCLASSEXTEND = "native nativesdk"