2021-02-05 17:12:51 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder
|
2021-07-24 12:14:16 +00:00
|
|
|
, pytestCheckHook, mock, pytest-cov, coverage
|
2021-12-06 16:07:01 +00:00
|
|
|
, future, futures ? null, ujson}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-jsonrpc-server";
|
2021-01-15 22:18:51 +00:00
|
|
|
version = "0.4.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "palantir";
|
|
|
|
repo = "python-jsonrpc-server";
|
|
|
|
rev = version;
|
2021-01-15 22:18:51 +00:00
|
|
|
sha256 = "0pcf50qvcxqnz3db58whqd8z89cdph19pfs1whgfm0zmwbwk0lw6";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2020-11-15 13:44:38 +00:00
|
|
|
sed -i "s/version=versioneer.get_version(),/version=\"$version\",/g" setup.py
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-07-24 12:14:16 +00:00
|
|
|
pytestCheckHook mock pytest-cov coverage
|
2020-06-15 15:56:04 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ future ujson ]
|
2021-02-05 17:12:51 +00:00
|
|
|
++ lib.optional (pythonOlder "3.2") futures;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/palantir/python-jsonrpc-server";
|
|
|
|
description = "A Python 2 and 3 asynchronous JSON RPC server";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.mic92 ];
|
|
|
|
};
|
|
|
|
}
|