diff options
author | Frederik Rietdijk <freddyrietdijk@fridh.nl> | 2017-05-30 08:39:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-30 08:39:36 +0200 |
commit | 67f6f3a4202511fb6c74d9a5d09da79119da3e80 (patch) | |
tree | 8c26f7978e1a1de6f83e32962380977d6423fa60 /pkgs/development/python-modules | |
parent | 165c116a329e9df8886561bb22e0fc8cdf94a61c (diff) | |
parent | eb2994a0d5541d591cd4fc2435b978b00b19bc46 (diff) | |
download | nixlib-67f6f3a4202511fb6c74d9a5d09da79119da3e80.tar nixlib-67f6f3a4202511fb6c74d9a5d09da79119da3e80.tar.gz nixlib-67f6f3a4202511fb6c74d9a5d09da79119da3e80.tar.bz2 nixlib-67f6f3a4202511fb6c74d9a5d09da79119da3e80.tar.lz nixlib-67f6f3a4202511fb6c74d9a5d09da79119da3e80.tar.xz nixlib-67f6f3a4202511fb6c74d9a5d09da79119da3e80.tar.zst nixlib-67f6f3a4202511fb6c74d9a5d09da79119da3e80.zip |
Merge pull request #26221 from knedlsepp/fix-pandas-darwin-build
pandas: Fix build on darwin
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r-- | pkgs/development/python-modules/pandas/default.nix | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/pkgs/development/python-modules/pandas/default.nix b/pkgs/development/python-modules/pandas/default.nix index 103907c26d14..0d3a2d2dd5c3 100644 --- a/pkgs/development/python-modules/pandas/default.nix +++ b/pkgs/development/python-modules/pandas/default.nix @@ -19,7 +19,6 @@ , openpyxl , tables , xlwt -, darwin ? {} , libcxx ? null }: @@ -53,7 +52,7 @@ in buildPythonPackage rec { openpyxl tables xlwt - ] ++ optional isDarwin darwin.locale; # provides the locale command + ]; # For OSX, we need to add a dependency on libcxx, which provides # `complex.h` and other libraries that pandas depends on to build. @@ -63,16 +62,22 @@ in buildPythonPackage rec { substituteInPlace setup.py \ --replace "['pandas/src/klib', 'pandas/src']" \ "['pandas/src/klib', 'pandas/src', '$cpp_sdk']" - - # disable clipboard tests since pbcopy/pbpaste are not open source - substituteInPlace pandas/io/tests/test_clipboard.py \ - --replace pandas.util.clipboard no_such_module \ - --replace OSError ImportError ''; checkPhase = '' runHook preCheck - py.test $out/${python.sitePackages}/pandas --skip-slow --skip-network + '' + # TODO: Get locale and clipboard support working on darwin. + # Until then we disable the tests. + + optionalString isDarwin '' + # Fake the impure dependencies pbpaste and pbcopy + echo "#!/bin/sh" > pbcopy + echo "#!/bin/sh" > pbpaste + chmod a+x pbcopy pbpaste + export PATH=$(pwd):$PATH + '' + '' + py.test $out/${python.sitePackages}/pandas --skip-slow --skip-network \ + ${if isDarwin then "-k 'not test_locale and not test_clipboard'" else ""} runHook postCheck ''; @@ -83,7 +88,7 @@ in buildPythonPackage rec { homepage = "http://pandas.pydata.org/"; description = "Python Data Analysis Library"; license = stdenv.lib.licenses.bsd3; - maintainers = with stdenv.lib.maintainers; [ raskin fridh ]; + maintainers = with stdenv.lib.maintainers; [ raskin fridh knedlsepp ]; platforms = stdenv.lib.platforms.unix; }; } |