2019-11-25 19:32:43 +00:00
|
|
|
|
{ lib
|
|
|
|
|
, python
|
|
|
|
|
, buildPythonPackage
|
|
|
|
|
, fetchFromGitHub
|
|
|
|
|
, cython
|
2020-09-05 18:23:21 +01:00
|
|
|
|
, pybind11
|
2019-11-25 19:32:43 +00:00
|
|
|
|
, tiledb
|
|
|
|
|
, numpy
|
|
|
|
|
, wheel
|
|
|
|
|
, isPy3k
|
|
|
|
|
, setuptools_scm
|
|
|
|
|
, psutil
|
2020-09-05 18:23:21 +01:00
|
|
|
|
, pandas
|
2019-11-25 19:32:43 +00:00
|
|
|
|
}:
|
|
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
|
pname = "tiledb";
|
2020-09-05 18:23:21 +01:00
|
|
|
|
version = "0.6.6";
|
2019-11-25 19:32:43 +00:00
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "TileDB-Inc";
|
|
|
|
|
repo = "TileDB-Py";
|
|
|
|
|
rev = version;
|
2020-09-05 18:23:21 +01:00
|
|
|
|
sha256 = "0b2kn1xyf7d994kz29dpqiaf8yzvx0axw4yqi854c54pl22ddgzl";
|
2019-11-25 19:32:43 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
|
cython
|
2020-09-05 18:23:21 +01:00
|
|
|
|
pybind11
|
2019-11-25 19:32:43 +00:00
|
|
|
|
setuptools_scm
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
|
tiledb
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
|
numpy
|
|
|
|
|
wheel # No idea why but it is listed
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
|
psutil
|
2020-09-05 18:23:21 +01:00
|
|
|
|
# optional
|
|
|
|
|
pandas
|
2019-11-25 19:32:43 +00:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
TILEDB_PATH = tiledb;
|
|
|
|
|
|
|
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
|
|
|
|
|
|
|
|
|
disabled = !isPy3k; # Not bothering with python2 anymore
|
|
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
|
# Hardcode path to shared object
|
|
|
|
|
substituteInPlace tiledb/__init__.py --replace \
|
|
|
|
|
'os.path.join(lib_dir, lib_name)' 'os.path.join("${tiledb}/lib", lib_name)'
|
2020-07-26 11:40:26 +01:00
|
|
|
|
|
2019-11-25 19:32:43 +00:00
|
|
|
|
# Disable failing test
|
|
|
|
|
substituteInPlace tiledb/tests/test_examples.py --replace \
|
|
|
|
|
"test_docs" "dont_test_docs"
|
2020-07-26 11:40:26 +01:00
|
|
|
|
# these tests don't always fail
|
|
|
|
|
substituteInPlace tiledb/tests/test_libtiledb.py --replace \
|
2020-09-05 18:23:21 +01:00
|
|
|
|
"test_varlen_write_int_subarray" "dont_test_varlen_write_int_subarray" \
|
2020-09-05 19:50:39 +01:00
|
|
|
|
--replace "test_memory_cleanup" "dont_test_memory_cleanup" \
|
|
|
|
|
--replace "test_ctx_thread_cleanup" "dont_test_ctx_thread_cleanup"
|
2020-07-26 11:40:26 +01:00
|
|
|
|
substituteInPlace tiledb/tests/test_metadata.py --replace \
|
|
|
|
|
"test_metadata_consecutive" "dont_test_metadata_consecutive"
|
2019-11-25 19:32:43 +00:00
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
checkPhase = ''
|
2020-09-05 18:23:21 +01:00
|
|
|
|
pushd "$TMPDIR"
|
2019-11-25 19:32:43 +00:00
|
|
|
|
${python.interpreter} -m unittest tiledb.tests.all.suite_test
|
|
|
|
|
popd
|
|
|
|
|
'';
|
2020-09-05 18:23:21 +01:00
|
|
|
|
pythonImportsCheck = [ "tiledb" ];
|
2019-11-25 19:32:43 +00:00
|
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
|
description = "Python interface to the TileDB storage manager";
|
2020-04-01 02:11:51 +01:00
|
|
|
|
homepage = "https://github.com/TileDB-Inc/TileDB-Py";
|
2019-11-25 19:32:43 +00:00
|
|
|
|
license = licenses.mit;
|
|
|
|
|
maintainers = with maintainers; [ fridh ];
|
2021-02-17 11:05:40 +00:00
|
|
|
|
# tiledb/core.cc:556:30: error: ‘struct std::array<long unsigned int, 2>’ has no member named ‘second’
|
|
|
|
|
broken = true;
|
2019-11-25 19:32:43 +00:00
|
|
|
|
};
|
2020-04-01 02:11:51 +01:00
|
|
|
|
}
|