2019-08-01 19:54:41 +02:00
|
|
|
{ blessed
|
2019-06-03 17:12:25 +02:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2019-08-01 19:54:41 +02:00
|
|
|
, lib
|
|
|
|
, libcxx
|
|
|
|
, libcxxabi
|
2019-06-03 17:12:25 +02:00
|
|
|
, llvm
|
2019-08-01 19:54:41 +02:00
|
|
|
, openmp
|
2019-06-03 17:12:25 +02:00
|
|
|
, pytest
|
2019-08-01 19:54:41 +02:00
|
|
|
, pythonOlder
|
|
|
|
, stdenv
|
|
|
|
, substituteAll
|
|
|
|
, typesentry
|
2019-06-03 17:12:25 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "datatable";
|
|
|
|
version = "0.8.0";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "1s8z81zffrckvdwrrl0pkjc7gsdvjxw59xgg6ck81dl7gkh5grjk";
|
|
|
|
};
|
|
|
|
|
2019-08-01 19:54:41 +02:00
|
|
|
patches = [
|
|
|
|
# Disable the compiler monkey patching, and remove the task that's copying
|
|
|
|
# the native dependencies to the build directory.
|
|
|
|
./remove-compiler-monkeypatch_disable-native-relocation.patch
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
# Replace the library auto-detection with hardcoded paths.
|
|
|
|
(substituteAll {
|
|
|
|
src = ./hardcode-library-paths.patch;
|
|
|
|
|
|
|
|
libomp_dylib = "${lib.getLib openmp}/lib/libomp.dylib";
|
|
|
|
libcxx_dylib = "${lib.getLib libcxx}/lib/libc++.1.dylib";
|
|
|
|
libcxxabi_dylib = "${lib.getLib libcxxabi}/lib/libc++abi.dylib";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2019-06-03 17:12:25 +02:00
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ typesentry blessed ];
|
2019-08-01 19:54:41 +02:00
|
|
|
buildInputs = [ llvm ] ++ lib.optionals stdenv.isDarwin [ openmp ];
|
2019-06-03 17:12:25 +02:00
|
|
|
checkInputs = [ pytest ];
|
|
|
|
|
|
|
|
LLVM = llvm;
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
# py.test adds local datatable to path, which doesn't contain built native library.
|
|
|
|
mv datatable datatable.hidden
|
|
|
|
pytest
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "data.table for Python";
|
|
|
|
homepage = "https://github.com/h2oai/datatable";
|
|
|
|
license = licenses.mpl20;
|
|
|
|
maintainers = with maintainers; [ abbradar ];
|
|
|
|
};
|
|
|
|
}
|