python312Packages.{lancedb,pylance}: update and fix (#359131)
This commit is contained in:
-8445
File diff suppressed because it is too large
Load Diff
@@ -2,16 +2,21 @@
|
||||
lib,
|
||||
stdenv,
|
||||
buildPythonPackage,
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
darwin,
|
||||
libiconv,
|
||||
rustPlatform,
|
||||
|
||||
# buildInputs
|
||||
openssl,
|
||||
|
||||
# nativeBuildInputs
|
||||
pkg-config,
|
||||
protobuf,
|
||||
|
||||
# dependencies
|
||||
attrs,
|
||||
cachetools,
|
||||
deprecation,
|
||||
nest-asyncio,
|
||||
overrides,
|
||||
packaging,
|
||||
pydantic,
|
||||
@@ -19,6 +24,8 @@
|
||||
requests,
|
||||
retry,
|
||||
tqdm,
|
||||
|
||||
# tests
|
||||
aiohttp,
|
||||
pandas,
|
||||
polars,
|
||||
@@ -30,23 +37,22 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "lancedb";
|
||||
version = "0.18.0";
|
||||
version = "0.19.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "lancedb";
|
||||
repo = "lancedb";
|
||||
tag = "python-v${version}";
|
||||
hash = "sha256-URgJFSrCccp9DBdW2VQgft1GZHu48pb8RrLHmBBow5Q=";
|
||||
hash = "sha256-AvISt9YpnHFrxRQYkkycXmsHSRs9QcBUe0DLXMYGrEI=";
|
||||
};
|
||||
|
||||
buildAndTestSubdir = "python";
|
||||
|
||||
cargoDeps = rustPlatform.importCargoLock { lockFile = ./Cargo.lock; };
|
||||
|
||||
postPatch = ''
|
||||
ln -s ${./Cargo.lock} Cargo.lock
|
||||
'';
|
||||
cargoDeps = rustPlatform.fetchCargoVendor {
|
||||
inherit pname version src;
|
||||
hash = "sha256-0mBCBQTv9nsHiQDUrZfm5+ZUGp3A2k8+DH/T85Vq2KA=";
|
||||
};
|
||||
|
||||
build-system = [ rustPlatform.maturinBuildHook ];
|
||||
|
||||
@@ -56,24 +62,15 @@ buildPythonPackage rec {
|
||||
rustPlatform.cargoSetupHook
|
||||
];
|
||||
|
||||
buildInputs =
|
||||
[
|
||||
libiconv
|
||||
openssl
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin (
|
||||
with darwin.apple_sdk.frameworks;
|
||||
[
|
||||
IOKit
|
||||
Security
|
||||
SystemConfiguration
|
||||
]
|
||||
);
|
||||
buildInputs = [
|
||||
openssl
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
attrs
|
||||
cachetools
|
||||
deprecation
|
||||
nest-asyncio
|
||||
overrides
|
||||
packaging
|
||||
pydantic
|
||||
@@ -100,37 +97,30 @@ buildPythonPackage rec {
|
||||
|
||||
pytestFlagsArray = [ "-m 'not slow'" ];
|
||||
|
||||
disabledTests =
|
||||
disabledTests = [
|
||||
# require tantivy which is not packaged in nixpkgs
|
||||
"test_basic"
|
||||
"test_fts_native"
|
||||
|
||||
# polars.exceptions.ComputeError: TypeError: _scan_pyarrow_dataset_impl() got multiple values for argument 'batch_size'
|
||||
# https://github.com/lancedb/lancedb/issues/1539
|
||||
"test_polars"
|
||||
];
|
||||
|
||||
disabledTestPaths =
|
||||
[
|
||||
# require tantivy which is not packaged in nixpkgs
|
||||
"test_basic"
|
||||
|
||||
# polars.exceptions.ComputeError: TypeError: _scan_pyarrow_dataset_impl() got multiple values for argument 'batch_size'
|
||||
# https://github.com/lancedb/lancedb/issues/1539
|
||||
"test_polars"
|
||||
|
||||
# Requires tantivy which is not packaged in nixpkgs
|
||||
"test_fts_native"
|
||||
# touch the network
|
||||
"test_s3.py"
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
# fail with darwin sandbox
|
||||
"test_async_remote_db"
|
||||
"test_http_error"
|
||||
"test_retry_error"
|
||||
# socket.gaierror: [Errno 8] nodename nor servname provided, or not known
|
||||
"test_remote_db.py"
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
# touch the network
|
||||
"test_s3.py"
|
||||
];
|
||||
|
||||
passthru.updateScript = nix-update-script {
|
||||
extraArgs = [
|
||||
"--version-regex"
|
||||
"python-v(.*)"
|
||||
"--generate-lockfile"
|
||||
"--lockfile-metadata-path"
|
||||
"python"
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
@@ -9,10 +9,8 @@
|
||||
pkg-config,
|
||||
|
||||
# buildInputs
|
||||
libiconv,
|
||||
openssl,
|
||||
protobuf,
|
||||
darwin,
|
||||
|
||||
# dependencies
|
||||
numpy,
|
||||
@@ -36,14 +34,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pylance";
|
||||
version = "0.22.0";
|
||||
version = "0.23.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "lancedb";
|
||||
repo = "lance";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-UOrkVHgTX1JK6chYJ6I+VJUquwsKLnOI5solS9W21HY=";
|
||||
hash = "sha256-I8v690MTEYWy3NjbElD3bzhBR4RcvzRKoJoKbL2f/JE=";
|
||||
};
|
||||
|
||||
sourceRoot = "${src.name}/python";
|
||||
@@ -55,7 +53,7 @@ buildPythonPackage rec {
|
||||
src
|
||||
sourceRoot
|
||||
;
|
||||
hash = "sha256-D9+rKV4rF5AVMxFfEohHufHC2mO75M80TuZaHDI0XMU=";
|
||||
hash = "sha256-vNVS+ps+lTQ4M5hl+0TWItVO3U2SN64jDHhblODmIT0=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
@@ -69,19 +67,10 @@ buildPythonPackage rec {
|
||||
rustPlatform.maturinBuildHook
|
||||
];
|
||||
|
||||
buildInputs =
|
||||
[
|
||||
libiconv
|
||||
openssl
|
||||
protobuf
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin (
|
||||
with darwin.apple_sdk.frameworks;
|
||||
[
|
||||
Security
|
||||
SystemConfiguration
|
||||
]
|
||||
);
|
||||
buildInputs = [
|
||||
openssl
|
||||
protobuf
|
||||
];
|
||||
|
||||
pythonRelaxDeps = [ "pyarrow" ];
|
||||
|
||||
@@ -111,22 +100,26 @@ buildPythonPackage rec {
|
||||
'';
|
||||
|
||||
disabledTests =
|
||||
lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
[
|
||||
# Writes to read-only build directory
|
||||
"test_add_data_storage_version"
|
||||
"test_fix_data_storage_version"
|
||||
]
|
||||
++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [
|
||||
# OSError: LanceError(IO): Resources exhausted: Failed to allocate additional 1245184 bytes for ExternalSorter[0]...
|
||||
"test_merge_insert_large"
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
# AttributeError: module 'torch.distributed' has no attribute 'is_initialized'
|
||||
"test_blob_api"
|
||||
"test_convert_int_tensors"
|
||||
"test_filtered_sampling_odd_batch_size"
|
||||
"test_ground_truth"
|
||||
"test_index_cast_centroids"
|
||||
"test_index_with_no_centroid_movement"
|
||||
"test_iter_filter"
|
||||
"test_iter_over_dataset_fixed_shape_tensor"
|
||||
"test_iter_over_dataset_fixed_size_lists"
|
||||
]
|
||||
++ [
|
||||
# incompatible with duckdb 1.1.1
|
||||
"test_duckdb_pushdown_extension_types"
|
||||
# Writes to read-only build directory
|
||||
"test_add_data_storage_version"
|
||||
"test_fix_data_storage_version"
|
||||
];
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
@@ -137,8 +130,5 @@ buildPythonPackage rec {
|
||||
changelog = "https://github.com/lancedb/lance/releases/tag/v${version}";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ natsukium ];
|
||||
# test_indices.py ...sss.Fatal Python error: Fatal Python error: Illegal instructionIllegal instruction
|
||||
# File "/nix/store/wiiccrs0vd1qbh4j6ki9p40xmamsjix3-python3.12-pylance-0.17.0/lib/python3.12/site-packages/lance/indices.py", line 237 in train_ivf
|
||||
broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -10729,9 +10729,7 @@ self: super: with self; {
|
||||
|
||||
pykrakenapi = callPackage ../development/python-modules/pykrakenapi { };
|
||||
|
||||
pylance = callPackage ../development/python-modules/pylance {
|
||||
inherit (pkgs) protobuf;
|
||||
};
|
||||
pylance = callPackage ../development/python-modules/pylance { };
|
||||
|
||||
pyldavis = callPackage ../development/python-modules/pyldavis { };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user