1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 grpcio,
6 protobuf,
7 pythonOlder,
8 pythonRelaxDepsHook,
9 setuptools,
10}:
11
12buildPythonPackage rec {
13 pname = "grpcio-testing";
14 version = "1.62.2";
15 pyproject = true;
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchPypi {
20 inherit pname version;
21 hash = "sha256-dNGeGQnpQbGmvvf71fnvMwWZ9nb7BrsGB8hFDtVVnfI=";
22 };
23
24 postPatch = ''
25 substituteInPlace setup.py \
26 --replace-fail '"grpcio>={version}".format(version=grpc_version.VERSION)' '"grpcio"'
27 '';
28
29 nativeBuildInputs = [ setuptools ];
30
31 propagatedBuildInputs = [
32 grpcio
33 protobuf
34 ];
35
36 pythonImportsCheck = [ "grpc_testing" ];
37
38 # Module has no tests
39 doCheck = false;
40
41 meta = with lib; {
42 description = "Testing utilities for gRPC Python";
43 homepage = "https://grpc.io/";
44 license = with licenses; [ asl20 ];
45 maintainers = with maintainers; [ fab ];
46 };
47}