1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 grpcio,
6 protobuf,
7 pythonOlder,
8 setuptools,
9}:
10
11# This package should be updated together with the main grpc package and other
12# related python grpc packages.
13# nixpkgs-update: no auto update
14buildPythonPackage rec {
15 pname = "grpcio-testing";
16 version = "1.74.0";
17 pyproject = true;
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchPypi {
22 pname = "grpcio_testing";
23 inherit version;
24 hash = "sha256-Ed7bU6QQ/jsqK8mp7ZyaaXlCDJMkPafXh/fM+aJUPjc=";
25 };
26
27 postPatch = ''
28 substituteInPlace setup.py \
29 --replace-fail '"grpcio>={version}".format(version=grpc_version.VERSION)' '"grpcio"'
30 '';
31
32 build-system = [ setuptools ];
33
34 pythonRelaxDeps = [
35 "protobuf"
36 ];
37
38 dependencies = [
39 grpcio
40 protobuf
41 ];
42
43 pythonImportsCheck = [ "grpc_testing" ];
44
45 # Module has no tests
46 doCheck = false;
47
48 meta = with lib; {
49 description = "Testing utilities for gRPC Python";
50 homepage = "https://grpc.io/";
51 license = with licenses; [ asl20 ];
52 maintainers = with maintainers; [ fab ];
53 };
54}