python310Packages.qdrant-client: adjust inputs

- enable tests
- add pythonImportsCheck
This commit is contained in:
Fabian Affolter 2023-04-23 15:02:47 +02:00 committed by Yt
parent 271d57f3fd
commit 24d6aa1a90

View File

@ -1,34 +1,71 @@
{ lib, buildPythonPackage, fetchPypi, python3Packages, numpy, httpx, grpcio, typing-extensions, grpcio-tools, pydantic, urllib3, h2 }:
{ lib
, buildPythonPackage
, fetchFromGitHub
, grpcio
, grpcio-tools
, h2
, httpx
, numpy
, pytestCheckHook
, poetry-core
, pydantic
, pythonOlder
, typing-extensions
, urllib3
}:
buildPythonPackage rec {
pname = "qdrant-client";
version = "1.1.0";
src = fetchPypi {
pname = "qdrant_client";
inherit version;
hash = "sha256-tiWPQXjYkUM77rgKYbQG4jdi9c/I2WTMq5y+9zLax/0=";
};
format = "pyproject";
nativeBuildInputs = with python3Packages; [
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "qdrant";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-rpNTV3VBTND39iW/kve0aG1KJzAIl1whmhH+e6RbOhw=";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
numpy
httpx
grpcio
typing-extensions
grpcio-tools
pydantic
urllib3
h2
];
# postPatch = ''
# substituteInPlace setup.cfg \
# --replace "validators>=0.18.2,<0.20.0" "validators>=0.18.2,<0.21.0"
# '';
nativeCheckInputs = [
pytestCheckHook
];
propagatedBuildInputs = [ numpy httpx grpcio typing-extensions grpcio-tools pydantic urllib3 h2 ];
pythonImportsCheck = [
"qdrant_client"
];
doCheck = false;
disabledTests = [
# Tests require network access
"test_conditional_payload_update"
"test_locks"
"test_multiple_vectors"
"test_points_crud"
"test_qdrant_client_integration"
"test_quantization_config"
"test_record_upload"
];
meta = with lib; {
homepage = "https://github.com/qdrant/qdrant-client";
description = "Python client for Qdrant vector search engine";
homepage = "https://github.com/qdrant/qdrant-client";
changelog = "https://github.com/qdrant/qdrant-client/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ happysalada ];
};