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

python312Packages.openai: 1.66.3 -> 1.68.2 (#391130)

parents 000de192 92336145
Loading
Loading
Loading
Loading
+33 −12
Original line number Diff line number Diff line
@@ -19,11 +19,17 @@
  tqdm,
  typing-extensions,

  # optional-dependencies (datalib)
  numpy,
  pandas,
  pandas-stubs,

  # optional-dependencies (realtime)
  websockets,

  # optional-dependencies (voice-helpers)
  sounddevice,

  # check deps
  pytestCheckHook,
  dirty-equals,
@@ -32,11 +38,15 @@
  pytest-asyncio,
  pytest-mock,
  respx,

  # optional-dependencies toggle
  withRealtime ? true,
  withVoiceHelpers ? true,
}:

buildPythonPackage rec {
  pname = "openai";
  version = "1.66.3";
  version = "1.68.2";
  pyproject = true;

  disabled = pythonOlder "3.8";
@@ -45,24 +55,31 @@ buildPythonPackage rec {
    owner = "openai";
    repo = "openai-python";
    tag = "v${version}";
    hash = "sha256-T9ZW/93ovzJgLEjLgzp/4bPezONxqlYNFpe6U8a7q/A=";
    hash = "sha256-TA+gr6cFGFlbAUqfgSbLFsoKdSZktPwk6DUfeq99PsM=";
  };

  postPatch = ''substituteInPlace pyproject.toml --replace-fail "hatchling==1.26.3" "hatchling"'';

  build-system = [
    hatchling
    hatch-fancy-pypi-readme
  ];

  dependencies = [
  dependencies =
    [
      anyio
      distro
      httpx
      jiter
      numpy
      pydantic
      sniffio
      sounddevice
      tqdm
      typing-extensions
  ] ++ optional-dependencies.realtime;
    ]
    ++ lib.optionals withRealtime optional-dependencies.realtime
    ++ lib.optionals withVoiceHelpers optional-dependencies.voice-helpers;

  optional-dependencies = {
    datalib = [
@@ -73,6 +90,10 @@ buildPythonPackage rec {
    realtime = [
      websockets
    ];
    voice-helpers = [
      numpy
      sounddevice
    ];
  };

  pythonImportsCheck = [ "openai" ];