depot/third_party/nixpkgs/pkgs/development/python-modules/opentelemetry-instrumentation/default.nix
Default email 5e9e1146e1 Project import generated by Copybara.
GitOrigin-RevId: 18036c0be90f4e308ae3ebcab0e14aae0336fe42
2023-08-05 00:07:22 +02:00

56 lines
1.4 KiB
Nix

{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, hatchling
, opentelemetry-api
, opentelemetry-sdk
, opentelemetry-test-utils
, setuptools
, wrapt
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "opentelemetry-instrumentation";
version = "0.39b0";
disabled = pythonOlder "3.7";
# to avoid breakage, every package in opentelemetry-python-contrib must inherit this version, src, and meta
src = fetchFromGitHub {
owner = "open-telemetry";
repo = "opentelemetry-python-contrib";
rev = "refs/tags/v${version}";
hash = "sha256-MPBOdurEQhA9BPRgVftejjtkvN/zRQEJDjQcS2QW3xc=";
};
sourceRoot = "source/opentelemetry-instrumentation";
format = "pyproject";
nativeBuildInputs = [
hatchling
];
propagatedBuildInputs = [
opentelemetry-api
opentelemetry-sdk
setuptools
wrapt
];
nativeCheckInputs = [
opentelemetry-test-utils
pytestCheckHook
];
pythonImportsCheck = [ "opentelemetry.instrumentation" ];
meta = with lib; {
homepage = "https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/opentelemetry-instrumentation";
description = "Instrumentation Tools & Auto Instrumentation for OpenTelemetry Python";
changelog = "https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/${src.rev}";
license = licenses.asl20;
maintainers = teams.deshaw.members ++ [ maintainers.natsukium ];
};
}