2023-01-11 07:51:40 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pipInstallHook
|
|
|
|
, writeText
|
2020-04-24 23:36:52 +00:00
|
|
|
, blessed
|
|
|
|
, docutils
|
|
|
|
, libcxx
|
|
|
|
, llvm
|
2020-10-07 09:15:18 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
, typesentry
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "datatable";
|
2023-01-11 07:51:40 +00:00
|
|
|
# python 3.10+ support is not in the 1.0.0 release
|
|
|
|
version = "unstable-2022-12-15";
|
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "h2oai";
|
|
|
|
repo = pname;
|
|
|
|
rev = "9522f0833d3e965656396de4fffebd882d39c25d";
|
|
|
|
hash = "sha256-lEXQwhx2msnJkkRrTkAwYttlYTISyH/Z7dSalqRrOhI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-10-07 09:15:18 +00:00
|
|
|
postPatch = ''
|
2021-12-06 16:07:01 +00:00
|
|
|
# tarball doesn't appear to have been shipped totally ready-to-build
|
2020-10-07 09:15:18 +00:00
|
|
|
substituteInPlace ci/ext.py \
|
|
|
|
--replace \
|
|
|
|
'shell_cmd(["git"' \
|
|
|
|
'"0000000000000000000000000000000000000000" or shell_cmd(["git"'
|
2023-01-11 07:51:40 +00:00
|
|
|
# TODO revert back to use ${version} when bumping to the next stable release
|
|
|
|
echo '1.0' > VERSION.txt
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
# don't make assumptions about architecture
|
|
|
|
sed -i '/-m64/d' ci/ext.py
|
2020-10-07 09:15:18 +00:00
|
|
|
'';
|
|
|
|
DT_RELEASE = "1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ typesentry blessed ];
|
2020-10-07 09:15:18 +00:00
|
|
|
buildInputs = [ llvm pipInstallHook ];
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ docutils pytestCheckHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
LLVM = llvm;
|
2021-05-20 23:08:51 +00:00
|
|
|
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-isystem ${lib.getDev libcxx}/include/c++/v1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
# test suite is very cpu intensive, only run small subset to ensure package is working as expected
|
|
|
|
pytestFlagsArray = [ "tests/test-sets.py" ];
|
|
|
|
|
2020-10-07 09:15:18 +00:00
|
|
|
disabledTests = [
|
|
|
|
# skip tests which are irrelevant to our installation or use way too much memory
|
|
|
|
"test_xfunction_paths"
|
|
|
|
"test_fread_from_cmd2"
|
|
|
|
"test_cast_huge_to_str"
|
|
|
|
"test_create_large_string_column"
|
|
|
|
];
|
|
|
|
pythonImportsCheck = [ "datatable" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "data.table for Python";
|
|
|
|
homepage = "https://github.com/h2oai/datatable";
|
|
|
|
license = licenses.mpl20;
|
|
|
|
maintainers = with maintainers; [ abbradar ];
|
|
|
|
};
|
|
|
|
}
|