summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2020-04-25 19:28:10 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-04-29 15:02:18 +0100
commit1407d1460cd2113be60192018839f5115953bd49 (patch)
tree4527b7c55694f6e260f2686889b2357a723057df /meta/recipes-devtools/python
parent182c1af2e632a34decfbef437b3b7995db898126 (diff)
downloadpoky-1407d1460cd2113be60192018839f5115953bd49.tar.gz
python3-cython: add from meta-oe
This is needed by new python3-numpy. (From OE-Core rev: 5b62f1c313d8b9a74f49ef30e7fa5ff489ae3e84) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python')
-rw-r--r--meta/recipes-devtools/python/python-cython.inc41
-rw-r--r--meta/recipes-devtools/python/python3-cython_0.29.14.bb18
2 files changed, 59 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python-cython.inc b/meta/recipes-devtools/python/python-cython.inc
new file mode 100644
index 0000000000..3d1df41308
--- /dev/null
+++ b/meta/recipes-devtools/python/python-cython.inc
@@ -0,0 +1,41 @@
1DESCRIPTION = "Cython is a language specially designed for writing Python extension modules. \
2It's designed to bridge the gap between the nice, high-level, easy-to-use world of Python \
3and the messy, low-level world of C."
4SECTION = "devel/python"
5LICENSE = "Apache-2.0"
6LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e23fadd6ceef8c618fc1c65191d846fa"
7PYPI_PACKAGE = "Cython"
8BBCLASSEXTEND = "native nativesdk"
9
10SRC_URI[md5sum] = "6e2f139e30bb08d68366f9370d87964c"
11SRC_URI[sha256sum] = "e4d6bb8703d0319eb04b7319b12ea41580df44fd84d83ccda13ea463c6801414"
12UPSTREAM_CHECK_REGEX = "Cython-(?P<pver>.*)\.tar"
13
14inherit pypi
15
16RDEPENDS_${PN}_class-target += "\
17 ${PYTHON_PN}-misc \
18 ${PYTHON_PN}-netserver \
19 ${PYTHON_PN}-pkgutil \
20 ${PYTHON_PN}-pyparsing \
21 ${PYTHON_PN}-setuptools \
22 ${PYTHON_PN}-shell \
23 ${PYTHON_PN}-xml \
24"
25
26RDEPENDS_${PN}_class-nativesdk += "\
27 nativesdk-${PYTHON_PN}-misc \
28 nativesdk-${PYTHON_PN}-netserver \
29 nativesdk-${PYTHON_PN}-pkgutil \
30 nativesdk-${PYTHON_PN}-pyparsing \
31 nativesdk-${PYTHON_PN}-setuptools \
32 nativesdk-${PYTHON_PN}-shell \
33 nativesdk-${PYTHON_PN}-xml \
34"
35
36do_install_append() {
37 # Make sure we use /usr/bin/env python
38 for PYTHSCRIPT in `grep -rIl '^#!.*python' ${D}`; do
39 sed -i -e '1s|^#!.*|#!/usr/bin/env ${PYTHON_PN}|' $PYTHSCRIPT
40 done
41}
diff --git a/meta/recipes-devtools/python/python3-cython_0.29.14.bb b/meta/recipes-devtools/python/python3-cython_0.29.14.bb
new file mode 100644
index 0000000000..2ce6bdbd68
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-cython_0.29.14.bb
@@ -0,0 +1,18 @@
1inherit setuptools3
2require python-cython.inc
3
4RDEPENDS_${PN} += "\
5 python3-setuptools \
6"
7
8# running build_ext a second time during install fails, because Python
9# would then attempt to import cythonized modules built for the target
10# architecture.
11DISTUTILS_INSTALL_ARGS += "--skip-build"
12
13do_install_append() {
14 # rename scripts that would conflict with the Python 2 build of Cython
15 mv ${D}${bindir}/cython ${D}${bindir}/cython3
16 mv ${D}${bindir}/cythonize ${D}${bindir}/cythonize3
17 mv ${D}${bindir}/cygdb ${D}${bindir}/cygdb3
18}