diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-02-24 23:27:27 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-02-25 15:07:50 +0000 |
| commit | 9348370e5a7b10dc13458874682ae3589e1c3748 (patch) | |
| tree | 96021383e7dd0e3e1961738aa20a49acf507ab05 /meta/recipes-devtools | |
| parent | bef2724dcb97e69ba500cdcee51351bb62482340 (diff) | |
| download | poky-9348370e5a7b10dc13458874682ae3589e1c3748.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.
(From OE-Core rev: 9888608f75a97a633bc7d2207ab2defc48c92ac4)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
| -rw-r--r-- | meta/recipes-devtools/python/python3-numpy_1.22.2.bb | 9 |
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() { | |||
| 30 | export NPY_DISABLE_SVML=1 | 30 | export NPY_DISABLE_SVML=1 |
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | # Unfortunately the following pyc files are non-deterministc due to 'frozenset' | ||
| 34 | # being written without strict ordering, even with PYTHONHASHSEED = 0 | ||
| 35 | # Upstream is discussing ways to solve the issue properly, until then let's | ||
| 36 | # just not install the problematic files. | ||
| 37 | # More info: http://benno.id.au/blog/2013/01/15/python-determinism | ||
| 38 | do_install:append() { | ||
| 39 | rm ${D}${PYTHON_SITEPACKAGES_DIR}/numpy/typing/tests/data/pass/__pycache__/literal.cpython* | ||
| 40 | } | ||
| 41 | |||
| 33 | FILES:${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a ${PYTHON_SITEPACKAGES_DIR}/numpy/random/lib/*.a" | 42 | FILES:${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a ${PYTHON_SITEPACKAGES_DIR}/numpy/random/lib/*.a" |
| 34 | 43 | ||
| 35 | # install what is needed for numpy.test() | 44 | # install what is needed for numpy.test() |
