Fix test on s390x using Debian patch
This commit is contained in:
parent
38f2f4e1cd
commit
9934e1ad39
19
force-little-endian-random.patch
Normal file
19
force-little-endian-random.patch
Normal 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
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user