blob: 9d086aedfdf6f681b8e5c5c2f9a520438ee6cf2b [file] [log] [blame]
Patrick Williams92b42cb2022-09-03 06:53:57 -05001SUMMARY = "A sophisticated Numeric Processing Package for Python"
2HOMEPAGE = "https://numpy.org/"
3DESCRIPTION = "NumPy is the fundamental package needed for scientific computing with Python."
4SECTION = "devel/python"
5LICENSE = "BSD-3-Clause & BSD-2-Clause & PSF-2.0 & Apache-2.0 & MIT"
6LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=8026691468924fb6ec155dadfe2a1a7f"
7
8SRCNAME = "numpy"
9
Andrew Geissler87f5cff2022-09-30 13:13:31 -050010SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${SRCNAME}-${PV}.tar.gz \
Patrick Williams92b42cb2022-09-03 06:53:57 -050011 file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \
12 file://0001-numpy-core-Define-RISCV-32-support.patch \
13 file://run-ptest \
14 file://0001-generate_umath.py-do-not-write-full-path-to-output-f.patch \
15 "
Andrew Geissler87f5cff2022-09-30 13:13:31 -050016SRC_URI[sha256sum] = "51bf49c0cd1d52be0a240aa66f3458afc4b95d8993d2d04f0d91fa60c10af6cd"
Patrick Williams92b42cb2022-09-03 06:53:57 -050017
Andrew Geissler87f5cff2022-09-30 13:13:31 -050018GITHUB_BASE_URI = "https://github.com/numpy/numpy/releases"
Patrick Williams92b42cb2022-09-03 06:53:57 -050019
20DEPENDS += "python3-cython-native"
21
Andrew Geissler87f5cff2022-09-30 13:13:31 -050022inherit ptest setuptools3 github-releases
Patrick Williams92b42cb2022-09-03 06:53:57 -050023
24S = "${WORKDIR}/numpy-${PV}"
25
26CLEANBROKEN = "1"
27
28do_compile:prepend() {
29 export NPY_DISABLE_SVML=1
30}
31
32# Unfortunately the following pyc files are non-deterministc due to 'frozenset'
33# being written without strict ordering, even with PYTHONHASHSEED = 0
34# Upstream is discussing ways to solve the issue properly, until then let's
35# just not install the problematic files.
36# More info: http://benno.id.au/blog/2013/01/15/python-determinism
37do_install:append() {
38 rm ${D}${PYTHON_SITEPACKAGES_DIR}/numpy/typing/tests/data/pass/__pycache__/literal.cpython*
39}
40
41FILES:${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a ${PYTHON_SITEPACKAGES_DIR}/numpy/random/lib/*.a"
42
43# install what is needed for numpy.test()
44RDEPENDS:${PN} = "${PYTHON_PN}-unittest \
45 ${PYTHON_PN}-difflib \
46 ${PYTHON_PN}-pprint \
47 ${PYTHON_PN}-pickle \
48 ${PYTHON_PN}-shell \
49 ${PYTHON_PN}-doctest \
50 ${PYTHON_PN}-datetime \
51 ${PYTHON_PN}-distutils \
52 ${PYTHON_PN}-misc \
53 ${PYTHON_PN}-mmap \
54 ${PYTHON_PN}-netclient \
55 ${PYTHON_PN}-numbers \
56 ${PYTHON_PN}-pydoc \
57 ${PYTHON_PN}-pkgutil \
58 ${PYTHON_PN}-email \
59 ${PYTHON_PN}-compression \
60 ${PYTHON_PN}-ctypes \
61 ${PYTHON_PN}-threading \
62 ${PYTHON_PN}-multiprocessing \
63 ${PYTHON_PN}-json \
64"
65RDEPENDS:${PN}-ptest += "${PYTHON_PN}-pytest \
66 ${PYTHON_PN}-hypothesis \
67 ${PYTHON_PN}-sortedcontainers \
68 ${PYTHON_PN}-resource \
69 ldd \
70"
71
72BBCLASSEXTEND = "native nativesdk"