pandas: add libcxx dependency on darwin (close #9862)
vcunat changed `optional` arguments from lists to packages.
This commit is contained in:
parent
8e393dde0f
commit
79c6c27b9b
@ -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";
|
name = "pandas-0.16.2";
|
||||||
|
|
||||||
src = pkgs.fetchurl {
|
src = pkgs.fetchurl {
|
||||||
@ -9739,7 +9742,7 @@ let
|
|||||||
sha256 = "10agmrkps8bi5948vwpipfxds5kj1d076m9i0nhaxwqiw7gm6670";
|
sha256 = "10agmrkps8bi5948vwpipfxds5kj1d076m9i0nhaxwqiw7gm6670";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ self.nose ];
|
buildInputs = [ self.nose ] ++ optional isDarwin pkgs.libcxx;
|
||||||
propagatedBuildInputs = with self; [
|
propagatedBuildInputs = with self; [
|
||||||
dateutil
|
dateutil
|
||||||
numpy
|
numpy
|
||||||
@ -9753,7 +9756,17 @@ let
|
|||||||
html5lib
|
html5lib
|
||||||
modules.sqlite3
|
modules.sqlite3
|
||||||
beautifulsoup4
|
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 = ''
|
preCheck = ''
|
||||||
# Broken test, probably https://github.com/pydata/pandas/issues/10312:
|
# Broken test, probably https://github.com/pydata/pandas/issues/10312:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user