1{ buildPythonPackage
2, cirq-core
3, google-api-core
4, protobuf
5, pytestCheckHook
6, freezegun
7}:
8
9buildPythonPackage rec {
10 pname = "cirq-google";
11 inherit (cirq-core) version src meta;
12
13 sourceRoot = "source/${pname}";
14
15 postPatch = ''
16 substituteInPlace requirements.txt \
17 --replace "google-api-core[grpc] >= 1.14.0, < 2.0.0dev" "google-api-core[grpc] >= 1.14.0, < 3.0.0dev" \
18 --replace "protobuf >= 3.15.0, < 4" "protobuf >= 3.15.0"
19 '';
20
21 propagatedBuildInputs = [
22 cirq-core
23 google-api-core
24 protobuf
25 ];
26
27 checkInputs = [
28 freezegun
29 pytestCheckHook
30 ];
31
32 disabledTestPaths = [
33 # No need to test the version number
34 "cirq_google/_version_test.py"
35 ];
36
37 disabledTests = [
38 # unittest.mock.InvalidSpecError: Cannot autospec attr 'QuantumEngineServiceClient'
39 "test_get_engine_sampler_explicit_project_id"
40 "test_get_engine_sampler"
41 ];
42
43}