From d7ac030cb7d37a889668f2fec79c2d307b908faa Mon Sep 17 00:00:00 2001 From: wxt <3264117476@qq.com> Date: Sat, 7 Dec 2024 19:39:00 +0800 Subject: [PATCH] python312Packages.opentelemetry-instrumentation-grpc: fix build --- .../default.nix | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/opentelemetry-instrumentation-grpc/default.nix b/pkgs/development/python-modules/opentelemetry-instrumentation-grpc/default.nix index 9716dbc767c2..097cddf590bf 100644 --- a/pkgs/development/python-modules/opentelemetry-instrumentation-grpc/default.nix +++ b/pkgs/development/python-modules/opentelemetry-instrumentation-grpc/default.nix @@ -21,16 +21,6 @@ buildPythonPackage { disabled = pythonOlder "3.8"; - patches = [ - (fetchpatch2 { - name = "grpcio-compatibility.patch"; - url = "https://github.com/open-telemetry/opentelemetry-python-contrib/commit/1c8d8ef5368c15d27c0973ce80787fd94c7b3176.patch"; - includes = [ "src/opentelemetry/instrumentation/grpc/grpcext/_interceptor.py" ]; - stripLen = 2; - hash = "sha256-FH/VubT93kwh7nWQyPfECTIayMqWIjQYSEY5TER+4vY="; - }) - ]; - sourceRoot = "${opentelemetry-instrumentation.src.name}/instrumentation/opentelemetry-instrumentation-grpc"; build-system = [ hatchling ]; @@ -46,12 +36,20 @@ buildPythonPackage { instruments = [ grpcio ]; }; + env = { + PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION = "python"; + }; + nativeCheckInputs = [ opentelemetry-test-utils grpcio pytestCheckHook ]; + preBuild = '' + export TMPDIR=$(mktemp -d) + ''; + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ # RuntimeError: Failed to bind to address "TestOpenTelemetryServerInterceptorUnix"