depot/third_party/nixpkgs/pkgs/development/python-modules/opentelemetry-instrumentation-grpc/default.nix

53 lines
1.2 KiB
Nix
Raw Normal View History

{ lib
, buildPythonPackage
, pythonOlder
, hatchling
, opentelemetry-api
, opentelemetry-instrumentation
, opentelemetry-sdk
, opentelemetry-semantic-conventions
, opentelemetry-test-utils
, wrapt
, pytestCheckHook
, grpcio
}:
buildPythonPackage {
inherit (opentelemetry-instrumentation) version src;
pname = "opentelemetry-instrumentation-grpc";
disabled = pythonOlder "3.7";
sourceRoot = "source/instrumentation/opentelemetry-instrumentation-grpc";
format = "pyproject";
nativeBuildInputs = [
hatchling
];
propagatedBuildInputs = [
opentelemetry-api
opentelemetry-instrumentation
opentelemetry-sdk
opentelemetry-semantic-conventions
wrapt
];
passthru.optional-dependencies = {
instruments = [ grpcio ];
};
nativeCheckInputs = [
opentelemetry-test-utils
grpcio
pytestCheckHook
];
pythonImportsCheck = [ "opentelemetry.instrumentation.grpc" ];
meta = opentelemetry-instrumentation.meta // {
homepage = "https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation/opentelemetry-instrumentation-grpc";
description = "OpenTelemetry Instrumentation for grpc";
};
}