python3Packages.tiledb: 0.33.2 -> 0.34.0 (#422124)
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
cmake,
|
||||
zlib,
|
||||
lz4,
|
||||
@@ -22,6 +23,8 @@
|
||||
libpng,
|
||||
file,
|
||||
runCommand,
|
||||
curl,
|
||||
capnproto,
|
||||
useAVX2 ? stdenv.hostPlatform.avx2Support,
|
||||
}:
|
||||
|
||||
@@ -45,7 +48,17 @@ stdenv.mkDerivation rec {
|
||||
hash = "sha256-Cs3Lr8I/Mu02x78d7IySG0XX4u/VAjBs4p4b00XDT5k=";
|
||||
};
|
||||
|
||||
patches = lib.optionals stdenv.hostPlatform.isDarwin [ ./generate_embedded_data_header.patch ];
|
||||
patches = [
|
||||
# capnproto was updated to 1.2 in Nixpkgs, bring TileDB codebase up to speed
|
||||
# patch only affects serialization related code, extracted from https://github.com/TileDB-Inc/TileDB/pull/5616
|
||||
(fetchpatch {
|
||||
url = "https://github.com/TileDB-Inc/TileDB/pull/5616.patch";
|
||||
relative = "tiledb/sm/serialization";
|
||||
extraPrefix = "tiledb/sm/serialization/";
|
||||
hash = "sha256-5z/eJEHl+cnWRf1sMULodJyhmNh5KinDLlL1paMNiy4=";
|
||||
})
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [ ./generate_embedded_data_header.patch ];
|
||||
|
||||
# libcxx (as of llvm-19) does not yet support `stop_token` and `jthread`
|
||||
# without the -fexperimental-library flag. Tiledb adds its own
|
||||
@@ -62,6 +75,7 @@ stdenv.mkDerivation rec {
|
||||
cmakeFlags = [
|
||||
"-DTILEDB_WEBP=OFF"
|
||||
"-DTILEDB_WERROR=OFF"
|
||||
"-DTILEDB_SERIALIZATION=ON"
|
||||
# https://github.com/NixOS/nixpkgs/issues/144170
|
||||
"-DCMAKE_INSTALL_INCLUDEDIR=include"
|
||||
"-DCMAKE_INSTALL_LIBDIR=lib"
|
||||
@@ -74,6 +88,9 @@ stdenv.mkDerivation rec {
|
||||
cmake
|
||||
python3
|
||||
doxygen
|
||||
# Required for serialization
|
||||
curl
|
||||
capnproto
|
||||
]
|
||||
++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
python,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
@@ -12,12 +13,19 @@
|
||||
setuptools-scm,
|
||||
psutil,
|
||||
pandas,
|
||||
cmake,
|
||||
ninja,
|
||||
scikit-build-core,
|
||||
packaging,
|
||||
pytest,
|
||||
hypothesis,
|
||||
pyarrow,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "tiledb";
|
||||
version = "0.34.2";
|
||||
format = "setuptools";
|
||||
format = "pyproject";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "TileDB-Inc";
|
||||
@@ -26,58 +34,50 @@ buildPythonPackage rec {
|
||||
hash = "sha256-EXRrWp/2sMn7DCzgXk5L0692rhGtQZwWpVWYnfrxmGA=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
build-system = [
|
||||
cython
|
||||
pybind11
|
||||
setuptools-scm
|
||||
scikit-build-core
|
||||
packaging
|
||||
cmake
|
||||
ninja
|
||||
];
|
||||
|
||||
buildInputs = [ tiledb ];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
numpy
|
||||
wheel # No idea why but it is listed
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
psutil
|
||||
# optional
|
||||
pandas
|
||||
pytest
|
||||
hypothesis
|
||||
pyarrow
|
||||
];
|
||||
|
||||
TILEDB_PATH = tiledb;
|
||||
|
||||
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)'
|
||||
|
||||
# Disable failing test
|
||||
substituteInPlace tiledb/tests/test_examples.py --replace \
|
||||
"test_docs" "dont_test_docs"
|
||||
# these tests don't always fail
|
||||
substituteInPlace tiledb/tests/test_libtiledb.py --replace \
|
||||
"test_varlen_write_int_subarray" "dont_test_varlen_write_int_subarray" \
|
||||
--replace "test_memory_cleanup" "dont_test_memory_cleanup" \
|
||||
--replace "test_ctx_thread_cleanup" "dont_test_ctx_thread_cleanup"
|
||||
substituteInPlace tiledb/tests/test_metadata.py --replace \
|
||||
"test_metadata_consecutive" "dont_test_metadata_consecutive"
|
||||
'';
|
||||
dontUseCmakeConfigure = true;
|
||||
|
||||
# We have to run pytest from a diffferent directory to force it to import tiledb from $out
|
||||
# otherwise it cannot be imported because extension modules are not compiled in sources
|
||||
checkPhase = ''
|
||||
pushd "$TMPDIR"
|
||||
${python.interpreter} -m unittest tiledb.tests.all.suite_test
|
||||
${python.interpreter} -m pytest --pyargs tiledb${lib.optionalString stdenv.isDarwin " -k 'not test_ctx_thread_cleanup and not test_array'"}
|
||||
popd
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "tiledb" ];
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Python interface to the TileDB storage manager";
|
||||
homepage = "https://github.com/TileDB-Inc/TileDB-Py";
|
||||
license = licenses.mit;
|
||||
# tiledb/core.cc:556:30: error: ‘struct std::array<long unsigned int, 2>’ has no member named ‘second’
|
||||
broken = true;
|
||||
license = lib.licenses.mit;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user