depot/third_party/nixpkgs/pkgs/development/python-modules/rpcq/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

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 = "The RPC framework and message specification for rigetti Quantum Cloud services";
homepage = "https://github.com/rigetti/rpcq";
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
};
}