Merge pull request #307403 from natsukium/cohere/update

python311Packages.cohere: 4.56 -> 5.3.3

Changed files
+73 -14
pkgs
development
python-modules
cohere
httpx-sse
top-level
+17 -14
pkgs/development/python-modules/cohere/default.nix
···
{ lib
, buildPythonPackage
-
, fetchpatch
, fetchPypi
, poetry-core
, pythonOlder
-
, aiohttp
-
, backoff
, fastavro
-
, importlib-metadata
, requests
-
, urllib3
}:
buildPythonPackage rec {
pname = "cohere";
-
version = "4.56";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
-
hash = "sha256-rOAQzT1A/q74WnfazCMDtou7SnP0h+UGCyBxihqLmzc=";
};
-
nativeBuildInputs = [
poetry-core
];
-
propagatedBuildInputs = [
-
aiohttp
-
backoff
fastavro
-
importlib-metadata
requests
-
urllib3
];
# tests require CO_API_KEY
···
meta = with lib; {
description = "Simplify interfacing with the Cohere API";
homepage = "https://docs.cohere.com/docs";
-
changelog = "https://github.com/cohere-ai/cohere-python/blob/main/CHANGELOG.md#${builtins.replaceStrings ["."] [""] version}";
license = licenses.mit;
maintainers = with maintainers; [ natsukium ];
};
···
{ lib
, buildPythonPackage
, fetchPypi
, poetry-core
, pythonOlder
, fastavro
+
, httpx
+
, httpx-sse
+
, pydantic
, requests
+
, tokenizers
+
, types-requests
+
, typing-extensions
}:
buildPythonPackage rec {
pname = "cohere";
+
version = "5.3.3";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
+
hash = "sha256-+/WcC6sN7U0oCR+gwZOhFtgwPEwLCaQnId2KEjDqJ8M=";
};
+
build-system = [
poetry-core
];
+
dependencies = [
fastavro
+
httpx
+
httpx-sse
+
pydantic
requests
+
tokenizers
+
types-requests
+
typing-extensions
];
# tests require CO_API_KEY
···
meta = with lib; {
description = "Simplify interfacing with the Cohere API";
homepage = "https://docs.cohere.com/docs";
+
changelog = "https://github.com/cohere-ai/cohere-python/releases/tag/${version}";
license = licenses.mit;
maintainers = with maintainers; [ natsukium ];
};
+54
pkgs/development/python-modules/httpx-sse/default.nix
···
···
+
{
+
lib,
+
buildPythonPackage,
+
fetchFromGitHub,
+
setuptools,
+
setuptools-scm,
+
wheel,
+
httpx,
+
pytest-asyncio,
+
pytestCheckHook,
+
sse-starlette,
+
}:
+
+
buildPythonPackage rec {
+
pname = "httpx-sse";
+
version = "0.4.0";
+
pyproject = true;
+
+
src = fetchFromGitHub {
+
owner = "florimondmanca";
+
repo = "httpx-sse";
+
rev = "refs/tags/${version}";
+
hash = "sha256-nU8vkmV/WynzQrSrq9+FQXtfAJPVLpMsRSuntU0HWrE=";
+
};
+
+
# pytest-cov configuration is not necessary for packaging
+
postPatch = ''
+
rm setup.cfg
+
'';
+
+
build-system = [
+
setuptools
+
setuptools-scm
+
wheel
+
];
+
+
dependencies = [ httpx ];
+
+
pythonImportsCheck = [ "httpx_sse" ];
+
+
nativeCheckInputs = [
+
pytest-asyncio
+
pytestCheckHook
+
sse-starlette
+
];
+
+
meta = with lib; {
+
description = "Consume Server-Sent Event (SSE) messages with HTTPX";
+
homepage = "https://github.com/florimondmanca/httpx-sse";
+
changelog = "https://github.com/florimondmanca/httpx-sse/blob/${src.rev}/CHANGELOG.md";
+
license = licenses.mit;
+
maintainers = with maintainers; [ natsukium ];
+
};
+
}
+2
pkgs/top-level/python-packages.nix
···
httpx-socks = callPackage ../development/python-modules/httpx-socks { };
huawei-lte-api = callPackage ../development/python-modules/huawei-lte-api { };
huey = callPackage ../development/python-modules/huey { };
···
httpx-socks = callPackage ../development/python-modules/httpx-socks { };
+
httpx-sse = callPackage ../development/python-modules/httpx-sse { };
+
huawei-lte-api = callPackage ../development/python-modules/huawei-lte-api { };
huey = callPackage ../development/python-modules/huey { };