1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 fetchpatch2, 6 setuptools, 7 setuptools-scm, 8 wheel, 9 httpx, 10 pytest-asyncio, 11 pytestCheckHook, 12 sse-starlette, 13}: 14 15buildPythonPackage rec { 16 pname = "httpx-sse"; 17 version = "0.4.0"; 18 pyproject = true; 19 20 src = fetchFromGitHub { 21 owner = "florimondmanca"; 22 repo = "httpx-sse"; 23 tag = version; 24 hash = "sha256-nU8vkmV/WynzQrSrq9+FQXtfAJPVLpMsRSuntU0HWrE="; 25 }; 26 27 patches = [ 28 (fetchpatch2 { 29 url = "https://github.com/florimondmanca/httpx-sse/commit/643938c805e671fa20adcf314b447f862b77bcda.patch?full_index=1"; 30 hash = "sha256-V2PyTlleyoLa0DuvdlU8zGNsI9C8bTjMUcLjx81/e5k="; 31 }) 32 ]; 33 34 # pytest-cov configuration is not necessary for packaging 35 postPatch = '' 36 rm setup.cfg 37 ''; 38 39 build-system = [ 40 setuptools 41 setuptools-scm 42 wheel 43 ]; 44 45 dependencies = [ httpx ]; 46 47 pythonImportsCheck = [ "httpx_sse" ]; 48 49 nativeCheckInputs = [ 50 pytest-asyncio 51 pytestCheckHook 52 sse-starlette 53 ]; 54 55 meta = with lib; { 56 description = "Consume Server-Sent Event (SSE) messages with HTTPX"; 57 homepage = "https://github.com/florimondmanca/httpx-sse"; 58 changelog = "https://github.com/florimondmanca/httpx-sse/blob/${src.rev}/CHANGELOG.md"; 59 license = licenses.mit; 60 maintainers = with maintainers; [ natsukium ]; 61 }; 62}