summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3-cython_3.0.10.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/python/python3-cython_3.0.10.bb')
-rw-r--r--meta/recipes-devtools/python/python3-cython_3.0.10.bb74
1 files changed, 74 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python3-cython_3.0.10.bb b/meta/recipes-devtools/python/python3-cython_3.0.10.bb
new file mode 100644
index 0000000000..754543e711
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-cython_3.0.10.bb
@@ -0,0 +1,74 @@
1SUMMARY = "The Cython language"
2HOMEPAGE = "https://pypi.org/project/Cython/"
3DESCRIPTION = "Cython is a language specially designed for writing Python extension modules. \
4It's designed to bridge the gap between the nice, high-level, easy-to-use world of Python \
5and the messy, low-level world of C."
6SECTION = "devel/python"
7LICENSE = "Apache-2.0"
8LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=61c3ee8961575861fa86c7e62bc9f69c"
9PYPI_PACKAGE = "Cython"
10
11SRC_URI[sha256sum] = "dcc96739331fb854dcf503f94607576cfe8488066c61ca50dfd55836f132de99"
12UPSTREAM_CHECK_REGEX = "Cython-(?P<pver>.*)\.tar"
13
14inherit pypi setuptools3
15
16# running build_ext a second time during install fails, because Python
17# would then attempt to import cythonized modules built for the target
18# architecture.
19SETUPTOOLS_INSTALL_ARGS += "--skip-build"
20
21do_install:append() {
22 # Make sure we use /usr/bin/env python3
23 for PYTHSCRIPT in `grep -rIl '^#!.*python' ${D}`; do
24 sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT
25 done
26
27 # remove build paths from generated sources
28 sed -i -e 's|${WORKDIR}||' ${S}/Cython/*.c ${S}/Cython/Compiler/*.c ${S}/Cython/Plex/*.c
29
30 # rename scripts that would conflict with the Python 2 build of Cython
31 mv ${D}${bindir}/cython ${D}${bindir}/cython3
32 mv ${D}${bindir}/cythonize ${D}${bindir}/cythonize3
33 mv ${D}${bindir}/cygdb ${D}${bindir}/cygdb3
34}
35
36PACKAGESPLITFUNCS =+ "cython_fix_sources"
37
38cython_fix_sources () {
39 for f in ${PKGD}${TARGET_DBGSRC_DIR}/Cython/Compiler/FlowControl.c \
40 ${PKGD}${TARGET_DBGSRC_DIR}/Cython/Compiler/FusedNode.c \
41 ${PKGD}${TARGET_DBGSRC_DIR}/Cython/Compiler/Scanning.c \
42 ${PKGD}${TARGET_DBGSRC_DIR}/Cython/Compiler/Visitor.c \
43 ${PKGD}${TARGET_DBGSRC_DIR}/Cython/Plex/Actions.c \
44 ${PKGD}${TARGET_DBGSRC_DIR}/Cython/Plex/Scanners.c \
45 ${PKGD}${TARGET_DBGSRC_DIR}/Cython/Runtime/refnanny.c \
46 ${PKGD}${TARGET_DBGSRC_DIR}/Cython/Tempita/_tempita.c \
47 ${PKGD}${libdir}/${PYTHON_DIR}/site-packages/Cython*/SOURCES.txt; do
48 if [ -e $f ]; then
49 sed -i -e 's#${WORKDIR}/Cython-${PV}#${TARGET_DBGSRC_DIR}#g' $f
50 fi
51 done
52}
53
54RDEPENDS:${PN}:class-target += "\
55 python3-misc \
56 python3-netserver \
57 python3-pkgutil \
58 python3-pyparsing \
59 python3-setuptools \
60 python3-shell \
61 python3-xml \
62"
63
64RDEPENDS:${PN}:class-nativesdk += "\
65 nativesdk-python3-misc \
66 nativesdk-python3-netserver \
67 nativesdk-python3-pkgutil \
68 nativesdk-python3-pyparsing \
69 nativesdk-python3-setuptools \
70 nativesdk-python3-shell \
71 nativesdk-python3-xml \
72"
73
74BBCLASSEXTEND = "native nativesdk"