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