5c370c0b2a
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
54 lines
1.1 KiB
Nix
54 lines
1.1 KiB
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 ];
|
|
};
|
|
}
|