Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 21.11 71 lines 1.9 kB view raw
1{ stdenv, lib, buildPythonPackage, fetchPypi, pythonOlder 2, pipInstallHook, writeText 3, blessed 4, docutils 5, libcxx 6, llvm 7, pytestCheckHook 8, typesentry 9}: 10 11buildPythonPackage rec { 12 pname = "datatable"; 13 version = "0.11.0"; 14 disabled = pythonOlder "3.5"; 15 16 src = fetchPypi { 17 inherit pname version; 18 sha256 = "19c602711e00f72e9ae296d8fa742d46da037c2d3a2d254bdf68f817a8da76bb"; 19 }; 20 # authors seem to have created their own build system 21 format = "other"; 22 23 postPatch = '' 24 # tarball doesn't appear to have been shipped totally ready-to-build 25 substituteInPlace ci/ext.py \ 26 --replace \ 27 'shell_cmd(["git"' \ 28 '"0000000000000000000000000000000000000000" or shell_cmd(["git"' 29 echo '${version}' > VERSION.txt 30 31 # don't make assumptions about architecture 32 sed -i '/-m64/d' ci/ext.py 33 ''; 34 DT_RELEASE = "1"; 35 36 buildPhase = '' 37 python ci/ext.py wheel 38 ''; 39 40 propagatedBuildInputs = [ typesentry blessed ]; 41 buildInputs = [ llvm pipInstallHook ]; 42 checkInputs = [ docutils pytestCheckHook ]; 43 44 LLVM = llvm; 45 NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-isystem ${lib.getDev libcxx}/include/c++/v1"; 46 47 pytestFlagsArray = let 48 # ini file (not included in tarball) required to change python_files setting, 49 pytestIni = writeText "pytest.ini" '' 50 [pytest] 51 python_files = test_*.py test-*.py 52 ''; 53 in [ 54 "-c ${pytestIni}" 55 ]; 56 disabledTests = [ 57 # skip tests which are irrelevant to our installation or use way too much memory 58 "test_xfunction_paths" 59 "test_fread_from_cmd2" 60 "test_cast_huge_to_str" 61 "test_create_large_string_column" 62 ]; 63 pythonImportsCheck = [ "datatable" ]; 64 65 meta = with lib; { 66 description = "data.table for Python"; 67 homepage = "https://github.com/h2oai/datatable"; 68 license = licenses.mpl20; 69 maintainers = with maintainers; [ abbradar ]; 70 }; 71}