Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 python, 4 buildPythonPackage, 5 fetchFromGitHub, 6 cython, 7 pybind11, 8 tiledb, 9 numpy, 10 wheel, 11 isPy3k, 12 setuptools-scm, 13 psutil, 14 pandas, 15}: 16 17buildPythonPackage rec { 18 pname = "tiledb"; 19 version = "0.26.2"; 20 format = "setuptools"; 21 22 src = fetchFromGitHub { 23 owner = "TileDB-Inc"; 24 repo = "TileDB-Py"; 25 rev = "refs/tags/${version}"; 26 hash = "sha256-8c1l4zoD44SjaOUXlFUSho/y7oMNOEVM9ZlnRs1irV8="; 27 }; 28 29 nativeBuildInputs = [ 30 cython 31 pybind11 32 setuptools-scm 33 ]; 34 35 buildInputs = [ tiledb ]; 36 37 propagatedBuildInputs = [ 38 numpy 39 wheel # No idea why but it is listed 40 ]; 41 42 nativeCheckInputs = [ 43 psutil 44 # optional 45 pandas 46 ]; 47 48 TILEDB_PATH = tiledb; 49 50 disabled = !isPy3k; # Not bothering with python2 anymore 51 52 postPatch = '' 53 # Hardcode path to shared object 54 substituteInPlace tiledb/__init__.py --replace \ 55 'os.path.join(lib_dir, lib_name)' 'os.path.join("${tiledb}/lib", lib_name)' 56 57 # Disable failing test 58 substituteInPlace tiledb/tests/test_examples.py --replace \ 59 "test_docs" "dont_test_docs" 60 # these tests don't always fail 61 substituteInPlace tiledb/tests/test_libtiledb.py --replace \ 62 "test_varlen_write_int_subarray" "dont_test_varlen_write_int_subarray" \ 63 --replace "test_memory_cleanup" "dont_test_memory_cleanup" \ 64 --replace "test_ctx_thread_cleanup" "dont_test_ctx_thread_cleanup" 65 substituteInPlace tiledb/tests/test_metadata.py --replace \ 66 "test_metadata_consecutive" "dont_test_metadata_consecutive" 67 ''; 68 69 checkPhase = '' 70 pushd "$TMPDIR" 71 ${python.interpreter} -m unittest tiledb.tests.all.suite_test 72 popd 73 ''; 74 pythonImportsCheck = [ "tiledb" ]; 75 76 meta = with lib; { 77 description = "Python interface to the TileDB storage manager"; 78 homepage = "https://github.com/TileDB-Inc/TileDB-Py"; 79 license = licenses.mit; 80 # tiledb/core.cc:556:30: error: ‘struct std::array<long unsigned int, 2>’ has no member named ‘second’ 81 broken = true; 82 }; 83}