diff options
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.bb | 74 |
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 @@ | |||
1 | SUMMARY = "The Cython language" | ||
2 | HOMEPAGE = "https://pypi.org/project/Cython/" | ||
3 | DESCRIPTION = "Cython is a language specially designed for writing Python extension modules. \ | ||
4 | It's designed to bridge the gap between the nice, high-level, easy-to-use world of Python \ | ||
5 | and the messy, low-level world of C." | ||
6 | SECTION = "devel/python" | ||
7 | LICENSE = "Apache-2.0" | ||
8 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=61c3ee8961575861fa86c7e62bc9f69c" | ||
9 | PYPI_PACKAGE = "Cython" | ||
10 | |||
11 | SRC_URI[sha256sum] = "dcc96739331fb854dcf503f94607576cfe8488066c61ca50dfd55836f132de99" | ||
12 | UPSTREAM_CHECK_REGEX = "Cython-(?P<pver>.*)\.tar" | ||
13 | |||
14 | inherit 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. | ||
19 | SETUPTOOLS_INSTALL_ARGS += "--skip-build" | ||
20 | |||
21 | do_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 | |||
36 | PACKAGESPLITFUNCS =+ "cython_fix_sources" | ||
37 | |||
38 | cython_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 | |||
54 | RDEPENDS:${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 | |||
64 | RDEPENDS:${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 | |||
74 | BBCLASSEXTEND = "native nativesdk" | ||