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