2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
msgpack,
|
|
|
|
numpy,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytestCheckHook,
|
|
|
|
python-rapidjson,
|
|
|
|
pythonOlder,
|
|
|
|
pyzmq,
|
|
|
|
ruamel-yaml,
|
|
|
|
setuptools,
|
2021-10-28 06:52:43 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "rpcq";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "3.10.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
2021-10-28 06:52:43 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rigetti";
|
2024-01-02 11:29:13 +00:00
|
|
|
repo = "rpcq";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-J7jtGXJIF3jp0a0IQZmSR4TWf9D02Luau+Bupmi/d68=";
|
2021-10-28 06:52:43 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "msgpack>=0.6,<1.0" "msgpack"
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
msgpack
|
|
|
|
python-rapidjson
|
|
|
|
pyzmq
|
|
|
|
ruamel-yaml
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-10-28 06:52:43 +00:00
|
|
|
numpy
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
# Don't run tests that spin-up a zmq server
|
|
|
|
"rpcq/test/test_base.py"
|
|
|
|
"rpcq/test/test_spec.py"
|
2021-12-26 17:43:05 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "rpcq" ];
|
2021-10-28 06:52:43 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "The RPC framework and message specification for rigetti Quantum Cloud services";
|
|
|
|
homepage = "https://github.com/rigetti/rpcq";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|