2021-11-12 09:22:34 +00:00
|
|
|
{ buildPythonPackage
|
2021-05-19 22:43:25 +00:00
|
|
|
, cirq-core
|
|
|
|
, google-api-core
|
|
|
|
, protobuf
|
|
|
|
, pytestCheckHook
|
|
|
|
, freezegun
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cirq-google";
|
|
|
|
inherit (cirq-core) version src meta;
|
|
|
|
|
|
|
|
sourceRoot = "source/${pname}";
|
|
|
|
|
|
|
|
postPatch = ''
|
2021-08-24 21:03:32 +00:00
|
|
|
substituteInPlace requirements.txt \
|
2022-10-16 15:19:35 +00:00
|
|
|
--replace "google-api-core[grpc] >= 1.14.0, < 2.0.0dev" "google-api-core[grpc] >= 1.14.0, < 3.0.0dev" \
|
|
|
|
--replace "protobuf >= 3.15.0, < 4" "protobuf >= 3.15.0"
|
2021-05-19 22:43:25 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
cirq-core
|
|
|
|
google-api-core
|
|
|
|
protobuf
|
2022-12-28 12:19:47 +00:00
|
|
|
] ++ google-api-core.optional-dependencies.grpc;
|
2021-05-19 22:43:25 +00:00
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2021-09-18 18:51:12 +00:00
|
|
|
freezegun
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2022-01-11 09:29:45 +00:00
|
|
|
|
2022-10-16 15:19:35 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# No need to test the version number
|
|
|
|
"cirq_google/_version_test.py"
|
|
|
|
];
|
|
|
|
|
2022-01-11 09:29:45 +00:00
|
|
|
disabledTests = [
|
|
|
|
# unittest.mock.InvalidSpecError: Cannot autospec attr 'QuantumEngineServiceClient'
|
|
|
|
"test_get_engine_sampler_explicit_project_id"
|
|
|
|
"test_get_engine_sampler"
|
|
|
|
];
|
2022-10-16 15:19:35 +00:00
|
|
|
|
2021-05-19 22:43:25 +00:00
|
|
|
}
|