nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ buildPythonPackage
2, cirq-core
3, google-api-core
4, protobuf
5# test inputs
6, pytestCheckHook
7, freezegun
8}:
9
10buildPythonPackage rec {
11 pname = "cirq-google";
12 inherit (cirq-core) version src meta;
13
14 sourceRoot = "source/${pname}";
15
16 postPatch = ''
17 substituteInPlace requirements.txt \
18 --replace "google-api-core[grpc] >= 1.14.0, < 2.0.0dev" "google-api-core[grpc] >= 1.14.0, < 3.0.0dev"
19 '';
20
21 propagatedBuildInputs = [
22 cirq-core
23 google-api-core
24 protobuf
25 ];
26
27 checkInputs = [
28 freezegun
29 pytestCheckHook
30 ];
31
32 disabledTests = [
33 # unittest.mock.InvalidSpecError: Cannot autospec attr 'QuantumEngineServiceClient'
34 "test_get_engine_sampler_explicit_project_id"
35 "test_get_engine_sampler"
36 ];
37}