2019-09-14 00:06:06 +01:00
|
|
|
{ stdenv, lib, buildPythonPackage, fetchPypi, substituteAll, pythonOlder
|
2020-09-24 22:47:07 +01:00
|
|
|
, pipInstallHook, writeText
|
2019-09-14 00:06:06 +01:00
|
|
|
, blessed
|
|
|
|
, docutils
|
2019-08-01 18:54:41 +01:00
|
|
|
, libcxx
|
2019-06-03 16:12:25 +01:00
|
|
|
, llvm
|
2020-09-24 22:47:07 +01:00
|
|
|
, pytestCheckHook
|
2019-08-01 18:54:41 +01:00
|
|
|
, typesentry
|
2019-06-03 16:12:25 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "datatable";
|
2020-09-24 22:47:07 +01:00
|
|
|
version = "0.11.0";
|
2019-09-14 00:06:06 +01:00
|
|
|
disabled = pythonOlder "3.5";
|
2019-06-03 16:12:25 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-09-24 22:47:07 +01:00
|
|
|
sha256 = "19c602711e00f72e9ae296d8fa742d46da037c2d3a2d254bdf68f817a8da76bb";
|
2019-06-03 16:12:25 +01:00
|
|
|
};
|
2020-09-24 22:47:07 +01:00
|
|
|
# authors seem to have created their own build system
|
|
|
|
format = "other";
|
2019-06-03 16:12:25 +01:00
|
|
|
|
2020-09-24 22:47:07 +01:00
|
|
|
# tarball doesn't appear to have been shipped totally ready-to-build
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace ci/ext.py \
|
|
|
|
--replace \
|
|
|
|
'shell_cmd(["git"' \
|
|
|
|
'"0000000000000000000000000000000000000000" or shell_cmd(["git"'
|
|
|
|
echo '${version}' > VERSION.txt
|
|
|
|
'';
|
|
|
|
DT_RELEASE = "1";
|
2019-08-01 18:54:41 +01:00
|
|
|
|
2020-09-24 22:47:07 +01:00
|
|
|
buildPhase = ''
|
|
|
|
python ci/ext.py wheel
|
|
|
|
'';
|
2019-08-01 18:54:41 +01:00
|
|
|
|
2019-06-03 16:12:25 +01:00
|
|
|
propagatedBuildInputs = [ typesentry blessed ];
|
2020-09-24 22:47:07 +01:00
|
|
|
buildInputs = [ llvm pipInstallHook ];
|
|
|
|
checkInputs = [ docutils pytestCheckHook ];
|
2019-06-03 16:12:25 +01:00
|
|
|
|
|
|
|
LLVM = llvm;
|
llvmPackages: Multuple outputs for everythting
Also begin to start work on cross compilation, though that will have to
be finished later.
The patches are based on the first version of
https://reviews.llvm.org/D99484. It's very annoying to do the
back-porting but the review has uncovered nothing super major so I'm
fine sticking with what I've got.
Beyond making the outputs work, I also strove to re-sync the packages,
as they have been drifting pointlessly apart for some time.
----
Other misc notes, highly incomplete
- lvm-config-native and llvm-config are put in `dev` because they are
tools just for build time.
- Clang no longer has an lld dep. That was introduced in
db29857eb391ed002046090851a44c452b80bdbd, but if clang needs help
finding lld when it is used we should just pass it flags / put in the
resource dir. Providing it at build time increases critical path
length for no good reason.
----
A note on `nativeCC`:
`stdenv` takes tools from the previous stage, so:
1. `pkgsBuildBuild`: `(?1, x, x)`
2. `pkgsBuildBuild.stdenv.cc`: `(?0, ?1, x)`
while:
1. `pkgsBuildBuild`: `(?1, x, x)`
2. `pkgsBuildBuild.targetPackages`: `(x, x, ?2)`
3. `pkgsBuildBuild.targetPackages.stdenv.cc`: `(?1, x, x)`
2020-10-15 09:23:57 +01:00
|
|
|
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-isystem ${lib.getDev libcxx}/include/c++/v1";
|
2019-06-03 16:12:25 +01:00
|
|
|
|
2020-09-24 22:47:07 +01: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" ];
|
2019-06-03 16:12:25 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "data.table for Python";
|
|
|
|
homepage = "https://github.com/h2oai/datatable";
|
|
|
|
license = licenses.mpl20;
|
|
|
|
maintainers = with maintainers; [ abbradar ];
|
|
|
|
};
|
|
|
|
}
|