Fix test on s390x using Debian patch

This commit is contained in:
Elliott Sales de Andrade 2023-08-27 02:00:01 -04:00
parent 38f2f4e1cd
commit 9934e1ad39
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,19 @@
Author: Diane Trout <diane@ghic.org>
Description: Force initializing the random seed with the same
byte order interpretation as on x86.
Index: dask-2023.8.0+dfsg/dask/utils.py
===================================================================
--- dask-2023.8.0+dfsg.orig/dask/utils.py
+++ dask-2023.8.0+dfsg/dask/utils.py
@@ -426,7 +426,9 @@ def random_state_data(n: int, random_sta
random_state = np.random.RandomState(random_state)
random_data = random_state.bytes(624 * n * 4) # `n * 624` 32-bit integers
- l = list(np.frombuffer(random_data, dtype=np.uint32).reshape((n, -1)))
+ dt = np.dtype(np.uint32)
+ dt = dt.newbyteorder("<")
+ l = list(np.frombuffer(random_data, dtype=dt).reshape((n, -1)))
assert len(l) == n
return l

View File

@ -26,6 +26,8 @@ Patch: 0002-Skip-coverage-testing.patch
Patch: 0003-TST-Increase-maximum-for-sizeof-test-to-pass-32-bit.patch
# https://github.com/dask/dask/pull/10451
Patch: 0004-Fix-test_pandas_timestamp_overflow_pyarrow-condition.patch
# https://github.com/dask/dask/issues/10423
Patch: https://salsa.debian.org/python-team/packages/dask/-/raw/08ffea1b7b53e9c71c9a926d5786288c2e6c1b5b/debian/patches/force-little-endian-random.patch
%description
Dask is a flexible parallel computing library for analytics.