at master 1.5 kB view raw
1{ 2 lib, 3 stdenv, 4 python, 5 buildPythonPackage, 6 fetchFromGitHub, 7 cython, 8 pybind11, 9 tiledb, 10 numpy, 11 wheel, 12 isPy3k, 13 setuptools-scm, 14 psutil, 15 pandas, 16 cmake, 17 ninja, 18 scikit-build-core, 19 packaging, 20 pytest, 21 hypothesis, 22 pyarrow, 23}: 24 25buildPythonPackage rec { 26 pname = "tiledb"; 27 version = "0.35.0"; 28 format = "pyproject"; 29 30 src = fetchFromGitHub { 31 owner = "TileDB-Inc"; 32 repo = "TileDB-Py"; 33 tag = version; 34 hash = "sha256-uxfF2uyGlO1Dfsrw0hxuU6LmymWXmuvOe+9DEY8BEdQ="; 35 }; 36 37 build-system = [ 38 cython 39 pybind11 40 setuptools-scm 41 scikit-build-core 42 packaging 43 cmake 44 ninja 45 ]; 46 47 buildInputs = [ tiledb ]; 48 49 propagatedBuildInputs = [ 50 numpy 51 ]; 52 53 nativeCheckInputs = [ 54 psutil 55 # optional 56 pandas 57 pytest 58 hypothesis 59 pyarrow 60 ]; 61 62 TILEDB_PATH = tiledb; 63 64 disabled = !isPy3k; # Not bothering with python2 anymore 65 66 dontUseCmakeConfigure = true; 67 68 # We have to run pytest from a diffferent directory to force it to import tiledb from $out 69 # otherwise it cannot be imported because extension modules are not compiled in sources 70 checkPhase = '' 71 pushd "$TMPDIR" 72 ${python.interpreter} -m pytest --pyargs tiledb${lib.optionalString stdenv.isDarwin " -k 'not test_ctx_thread_cleanup and not test_array'"} 73 popd 74 ''; 75 76 pythonImportsCheck = [ "tiledb" ]; 77 78 meta = { 79 description = "Python interface to the TileDB storage manager"; 80 homepage = "https://github.com/TileDB-Inc/TileDB-Py"; 81 license = lib.licenses.mit; 82 }; 83}