2021-12-06 16:07:01 +00:00
|
|
|
{ stdenv, lib, buildPythonPackage, fetchPypi, pythonOlder
|
2020-10-07 09:15:18 +00:00
|
|
|
, 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";
|
2020-10-07 09:15:18 +00:00
|
|
|
version = "0.11.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-10-07 09:15:18 +00:00
|
|
|
sha256 = "19c602711e00f72e9ae296d8fa742d46da037c2d3a2d254bdf68f817a8da76bb";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2020-10-07 09:15:18 +00:00
|
|
|
# authors seem to have created their own build system
|
|
|
|
format = "other";
|
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"'
|
|
|
|
echo '${version}' > 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
|
|
|
|
2020-10-07 09:15:18 +00:00
|
|
|
buildPhase = ''
|
|
|
|
python ci/ext.py wheel
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ typesentry blessed ];
|
2020-10-07 09:15:18 +00:00
|
|
|
buildInputs = [ llvm pipInstallHook ];
|
|
|
|
checkInputs = [ 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
|
|
|
|
2020-10-07 09:15:18 +00:00
|
|
|
pytestFlagsArray = let
|
|
|
|
# ini file (not included in tarball) required to change python_files setting,
|
|
|
|
pytestIni = writeText "pytest.ini" ''
|
|
|
|
[pytest]
|
|
|
|
python_files = test_*.py test-*.py
|
|
|
|
'';
|
|
|
|
in [
|
|
|
|
"-c ${pytestIni}"
|
|
|
|
];
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|