depot/third_party/nixpkgs/pkgs/development/python-modules/rpcq/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

64 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
msgpack,
numpy,
pytest-asyncio,
pytestCheckHook,
python-rapidjson,
pythonOlder,
pyzmq,
ruamel-yaml,
setuptools,
}:
buildPythonPackage rec {
pname = "rpcq";
version = "3.10.0";
pyproject = true;
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "rigetti";
repo = "rpcq";
rev = "refs/tags/v${version}";
hash = "sha256-J7jtGXJIF3jp0a0IQZmSR4TWf9D02Luau+Bupmi/d68=";
};
postPatch = ''
substituteInPlace setup.py \
--replace "msgpack>=0.6,<1.0" "msgpack"
'';
nativeBuildInputs = [ setuptools ];
propagatedBuildInputs = [
msgpack
python-rapidjson
pyzmq
ruamel-yaml
];
nativeCheckInputs = [
numpy
pytest-asyncio
pytestCheckHook
];
pytestFlagsArray = [
# Don't run tests that spin-up a zmq server
"rpcq/test/test_base.py"
"rpcq/test/test_spec.py"
];
pythonImportsCheck = [ "rpcq" ];
meta = with lib; {
description = "RPC framework and message specification for rigetti Quantum Cloud services";
homepage = "https://github.com/rigetti/rpcq";
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
};
}