summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-02-24 23:27:27 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-02-25 15:06:46 +0000
commit9888608f75a97a633bc7d2207ab2defc48c92ac4 (patch)
tree5adea38b1d7e04eebcfe453af8aa784ae878ad11
parent6663aaa636f06991ed1cff58178e378eeebadf44 (diff)
downloadopenembedded-core-contrib-9888608f75a97a633bc7d2207ab2defc48c92ac4.tar.gz
python3-numpy: Fix pyc determinism issue
Using frozenset causes problems for pyc file determinism. For now remove the problematic pyc file as we do in the main python3 recipe. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/python/python3-numpy_1.22.2.bb9
1 files changed, 9 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python3-numpy_1.22.2.bb b/meta/recipes-devtools/python/python3-numpy_1.22.2.bb
index d2b2f3e38d..43e7427eab 100644
--- a/meta/recipes-devtools/python/python3-numpy_1.22.2.bb
+++ b/meta/recipes-devtools/python/python3-numpy_1.22.2.bb
@@ -30,6 +30,15 @@ do_compile:prepend() {
export NPY_DISABLE_SVML=1
}
+# Unfortunately the following pyc files are non-deterministc due to 'frozenset'
+# being written without strict ordering, even with PYTHONHASHSEED = 0
+# Upstream is discussing ways to solve the issue properly, until then let's
+# just not install the problematic files.
+# More info: http://benno.id.au/blog/2013/01/15/python-determinism
+do_install:append() {
+ rm ${D}${PYTHON_SITEPACKAGES_DIR}/numpy/typing/tests/data/pass/__pycache__/literal.cpython*
+}
+
FILES:${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a ${PYTHON_SITEPACKAGES_DIR}/numpy/random/lib/*.a"
# install what is needed for numpy.test()