1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 msgpack,
6 numpy,
7 pytest-asyncio,
8 pytestCheckHook,
9 python-rapidjson,
10 pythonOlder,
11 pyzmq,
12 ruamel-yaml,
13 setuptools,
14}:
15
16buildPythonPackage rec {
17 pname = "rpcq";
18 version = "3.10.0";
19 pyproject = true;
20
21 disabled = pythonOlder "3.6";
22
23 src = fetchFromGitHub {
24 owner = "rigetti";
25 repo = "rpcq";
26 tag = "v${version}";
27 hash = "sha256-J7jtGXJIF3jp0a0IQZmSR4TWf9D02Luau+Bupmi/d68=";
28 };
29
30 postPatch = ''
31 substituteInPlace setup.py \
32 --replace "msgpack>=0.6,<1.0" "msgpack"
33 '';
34
35 nativeBuildInputs = [ setuptools ];
36
37 propagatedBuildInputs = [
38 msgpack
39 python-rapidjson
40 pyzmq
41 ruamel-yaml
42 ];
43
44 nativeCheckInputs = [
45 numpy
46 pytest-asyncio
47 pytestCheckHook
48 ];
49
50 enabledTestPaths = [
51 # Don't run tests that spin-up a zmq server
52 "rpcq/test/test_base.py"
53 "rpcq/test/test_spec.py"
54 ];
55
56 pythonImportsCheck = [ "rpcq" ];
57
58 meta = with lib; {
59 description = "RPC framework and message specification for rigetti Quantum Cloud services";
60 homepage = "https://github.com/rigetti/rpcq";
61 license = licenses.asl20;
62 maintainers = with maintainers; [ fab ];
63 };
64}