python312Packages.osmnx: 1.9.3 → 2.0.0 (#360529)
[NixPkgs.git] / pkgs / development / python-modules / opentelemetry-instrumentation-grpc / default.nix
blob9716dbc767c2226c858c6a51a6aea4329546e8e1
2   lib,
3   stdenv,
4   buildPythonPackage,
5   fetchpatch2,
6   pythonOlder,
7   hatchling,
8   opentelemetry-api,
9   opentelemetry-instrumentation,
10   opentelemetry-semantic-conventions,
11   opentelemetry-test-utils,
12   wrapt,
13   pytestCheckHook,
14   grpcio,
17 buildPythonPackage {
18   inherit (opentelemetry-instrumentation) version src;
19   pname = "opentelemetry-instrumentation-grpc";
20   pyproject = true;
22   disabled = pythonOlder "3.8";
24   patches = [
25     (fetchpatch2 {
26       name = "grpcio-compatibility.patch";
27       url = "https://github.com/open-telemetry/opentelemetry-python-contrib/commit/1c8d8ef5368c15d27c0973ce80787fd94c7b3176.patch";
28       includes = [ "src/opentelemetry/instrumentation/grpc/grpcext/_interceptor.py" ];
29       stripLen = 2;
30       hash = "sha256-FH/VubT93kwh7nWQyPfECTIayMqWIjQYSEY5TER+4vY=";
31     })
32   ];
34   sourceRoot = "${opentelemetry-instrumentation.src.name}/instrumentation/opentelemetry-instrumentation-grpc";
36   build-system = [ hatchling ];
38   dependencies = [
39     opentelemetry-api
40     opentelemetry-instrumentation
41     opentelemetry-semantic-conventions
42     wrapt
43   ];
45   optional-dependencies = {
46     instruments = [ grpcio ];
47   };
49   nativeCheckInputs = [
50     opentelemetry-test-utils
51     grpcio
52     pytestCheckHook
53   ];
55   disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
56     # RuntimeError: Failed to bind to address
57     "TestOpenTelemetryServerInterceptorUnix"
58   ];
60   pythonImportsCheck = [ "opentelemetry.instrumentation.grpc" ];
62   __darwinAllowLocalNetworking = true;
64   meta = opentelemetry-instrumentation.meta // {
65     homepage = "https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation/opentelemetry-instrumentation-grpc";
66     description = "OpenTelemetry Instrumentation for grpc";
67   };