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