python311Packages.nats-py: refactor

This commit is contained in:
Fabian Affolter 2024-02-06 10:15:40 +01:00
parent c8007548d1
commit 5ae1c67cd1

View File

@ -5,6 +5,7 @@
, ed25519
, fetchFromGitHub
, nats-server
, nkeys
, pytestCheckHook
, pythonOlder
, setuptools
@ -14,7 +15,7 @@
buildPythonPackage rec {
pname = "nats-py";
version = "2.7.0";
format = "pyproject";
pyproject = true;
disabled = pythonOlder "3.7";
@ -25,20 +26,26 @@ buildPythonPackage rec {
hash = "sha256-spKz0rKTI8hWdO6r8VLtP3G8tS9ANsjYRbinXOARCOQ=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace '"--cov=nats", "--cov-report=html"' ""
'';
nativeBuildInputs = [
setuptools
];
propagatedBuildInputs = [
aiohttp
ed25519
];
passthru.optional-dependencies = {
aiohttp = [
aiohttp
];
nkeys = [
nkeys
];
# fast_parse = [
# fast-mail-parser
# ];
};
nativeCheckInputs = [
nats-server
pytestCheckHook