Unverified Commit b51f5e4d authored by Yt's avatar Yt Committed by GitHub
Browse files

Merge pull request #307728 from fabaff/weaviate-client-fix

python312Packages.weaviate-client: 4.5.1 -> 4.5.6
parents 5d6e3342 e91977cf
Loading
Loading
Loading
Loading
+37 −26
Original line number Diff line number Diff line
{ lib
, authlib
, buildPythonPackage
, fetchPypi
, pythonOlder
, setuptools-scm
, tqdm
, validators
{
  lib,
  authlib,
  buildPythonPackage,
  fetchFromGitHub,
  grpcio,
  grpcio-health-checking,
  grpcio-tools,
  httpx,
  pydantic,
  pythonOlder,
  pythonRelaxDepsHook,
  setuptools-scm,
  tqdm,
  validators,
}:

buildPythonPackage rec {
  pname = "weaviate-client";
  version = "4.5.1";
  format = "setuptools";
  version = "4.5.6";
  pyproject = true;

  disabled = pythonOlder "3.7";
  disabled = pythonOlder "3.8";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-gElboFIwEMiwN6HhpPPT+tcmh0pMiDjq7R8TG2eMMKI=";
  src = fetchFromGitHub {
    owner = "weaviate";
    repo = "weaviate-python-client";
    rev = "refs/tags/v${version}";
    hash = "sha256-P1GiTsRDbJssoLZR//c+b4IJ2Zyb/0PaBLL+wmmI6zc=";
  };

  postPatch = ''
    substituteInPlace setup.cfg \
      --replace "validators>=0.18.2,<=0.21.0" "validators>=0.18.2" \
      --replace "requests>=2.28.0,<2.29.0" "requests>=2.28.0"
  '';

  nativeBuildInputs = [
    setuptools-scm
  pythonRelaxDeps = [
    "httpx"
    "validators"
  ];

  propagatedBuildInputs = [
  build-system = [ setuptools-scm ];

  nativeBuildInputs = [ pythonRelaxDepsHook ];

  dependencies = [
    authlib
    grpcio
    grpcio-health-checking
    grpcio-tools
    httpx
    pydantic
    tqdm
    validators
  ];

  doCheck = false;

  pythonImportsCheck = [
    "weaviate"
  ];
  pythonImportsCheck = [ "weaviate" ];

  meta = with lib; {
    description = "Python native client for easy interaction with a Weaviate instance";