diff options
author | Martin Weinelt <hexa@darmstadt.ccc.de> | 2021-03-01 16:03:00 +0100 |
---|---|---|
committer | Martin Weinelt <hexa@darmstadt.ccc.de> | 2021-03-01 16:03:00 +0100 |
commit | 9e86aa7157876fab0827125aeaa63024fbe534c7 (patch) | |
tree | 9913da60739dfc3be7016b2f271bb1e85450aa24 /pkgs/development/python-modules/pandas | |
parent | 00e61cf60efa10f7bb939ed9a3ee0ef18556c6bf (diff) | |
parent | 301d4939bab1b586d38932cc0cd2a6ed07ba7cfd (diff) |
Merge remote-tracking branch 'origin/master' into staging-next
Diffstat (limited to 'pkgs/development/python-modules/pandas')
-rw-r--r-- | pkgs/development/python-modules/pandas/default.nix | 12 | ||||
-rw-r--r-- | pkgs/development/python-modules/pandas/fix-tests.patch | 12 |
2 files changed, 14 insertions, 10 deletions
diff --git a/pkgs/development/python-modules/pandas/default.nix b/pkgs/development/python-modules/pandas/default.nix index c288d742fc142..63244618f5b28 100644 --- a/pkgs/development/python-modules/pandas/default.nix +++ b/pkgs/development/python-modules/pandas/default.nix @@ -34,6 +34,8 @@ buildPythonPackage rec { inherit pname version; sha256 = "14ed84b463e9b84c8ff9308a79b04bf591ae3122a376ee0f62c68a1bd917a773"; }; + # See https://github.com/scipy/scipy/issues/13585 and https://github.com/pandas-dev/pandas/pull/40020 + patches = [ ./fix-tests.patch ]; nativeBuildInputs = [ cython ]; buildInputs = lib.optional stdenv.isDarwin libcxx; @@ -59,16 +61,6 @@ buildPythonPackage rec { # https://github.com/NixOS/nixpkgs/issues/39687 hardeningDisable = lib.optional stdenv.cc.isClang "strictoverflow"; - # For OSX, we need to add a dependency on libcxx, which provides - # `complex.h` and other libraries that pandas depends on to build. - postPatch = lib.optionalString stdenv.isDarwin '' - cpp_sdk="${libcxx}/include/c++/v1"; - echo "Adding $cpp_sdk to the setup.py common_include variable" - substituteInPlace setup.py \ - --replace "['pandas/src/klib', 'pandas/src']" \ - "['pandas/src/klib', 'pandas/src', '$cpp_sdk']" - ''; - # Parallel Cythonization is broken in Python 3.8 on Darwin. Fixed in the next # release. https://github.com/pandas-dev/pandas/pull/30862 setupPyBuildFlags = lib.optionals (!(isPy38 && stdenv.isDarwin)) [ diff --git a/pkgs/development/python-modules/pandas/fix-tests.patch b/pkgs/development/python-modules/pandas/fix-tests.patch new file mode 100644 index 0000000000000..8051cfec39aee --- /dev/null +++ b/pkgs/development/python-modules/pandas/fix-tests.patch @@ -0,0 +1,12 @@ +diff --color -ur a/pandas/tests/arrays/sparse/test_array.py b/pandas/tests/arrays/sparse/test_array.py +--- a/pandas/tests/arrays/sparse/test_array.py 2020-12-07 12:42:08.000000000 +0100 ++++ b/pandas/tests/arrays/sparse/test_array.py 2021-02-27 21:48:16.483903149 +0100 +@@ -1188,7 +1188,7 @@ + row = [0, 3, 1, 0] + col = [0, 3, 1, 2] + data = [4, 5, 7, 9] +- sp_array = scipy.sparse.coo_matrix((data, (row, col))) ++ sp_array = scipy.sparse.coo_matrix((data, (row, col)), dtype="int") + result = pd.Series.sparse.from_coo(sp_array) + + index = pd.MultiIndex.from_arrays([[0, 0, 1, 3], [0, 2, 1, 3]]) |