1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-01-22 14:45:27 +00:00

pandas: add libcxx dependency on darwin (close #9862)

vcunat changed `optional` arguments from lists to packages.
This commit is contained in:
Allen Nelson 2015-09-14 15:06:21 -05:00 committed by Vladimír Čunát
parent 8e393dde0f
commit 79c6c27b9b

View file

@ -9731,7 +9731,10 @@ let
};
};
pandas = buildPythonPackage rec {
pandas = let
inherit (pkgs.stdenv.lib) optional optionalString;
inherit (pkgs.stdenv) isDarwin;
in buildPythonPackage rec {
name = "pandas-0.16.2";
src = pkgs.fetchurl {
@ -9739,7 +9742,7 @@ let
sha256 = "10agmrkps8bi5948vwpipfxds5kj1d076m9i0nhaxwqiw7gm6670";
};
buildInputs = [ self.nose ];
buildInputs = [ self.nose ] ++ optional isDarwin pkgs.libcxx;
propagatedBuildInputs = with self; [
dateutil
numpy
@ -9753,7 +9756,17 @@ let
html5lib
modules.sqlite3
beautifulsoup4
];
] ++ optional isDarwin pkgs.darwin.adv_cmds; # 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.
patchPhase = optionalString isDarwin ''
cpp_sdk="${pkgs.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']"
'';
preCheck = ''
# Broken test, probably https://github.com/pydata/pandas/issues/10312: