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