9c6ee729d6
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
58 lines
1.3 KiB
Nix
58 lines
1.3 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, pythonOlder
|
|
, fetchFromGitHub
|
|
, deprecated
|
|
, hatchling
|
|
, importlib-metadata
|
|
, opentelemetry-test-utils
|
|
, setuptools
|
|
, pytestCheckHook
|
|
}:
|
|
|
|
let
|
|
self = buildPythonPackage {
|
|
pname = "opentelemetry-api";
|
|
version = "1.18.0";
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "open-telemetry";
|
|
repo = "opentelemetry-python";
|
|
rev = "refs/tags/v${self.version}";
|
|
hash = "sha256-h6XDzM29wYiC51S7OpBXvWFCfZ7DmIyGMG2pFjJV7pI=";
|
|
sparseCheckout = [ "/${self.pname}" ];
|
|
} + "/${self.pname}";
|
|
|
|
format = "pyproject";
|
|
|
|
nativeBuildInputs = [
|
|
hatchling
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
deprecated
|
|
importlib-metadata
|
|
setuptools
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
opentelemetry-test-utils
|
|
pytestCheckHook
|
|
];
|
|
|
|
pythonImportsCheck = [ "opentelemetry" ];
|
|
|
|
doCheck = false;
|
|
|
|
# Enable tests via passthru to avoid cyclic dependency with opentelemetry-test-utils.
|
|
passthru.tests.${self.pname} = self.overridePythonAttrs { doCheck = true; };
|
|
|
|
meta = with lib; {
|
|
homepage = "https://opentelemetry.io";
|
|
description = "OpenTelemetry Python API";
|
|
license = licenses.asl20;
|
|
maintainers = teams.deshaw.members;
|
|
};
|
|
};
|
|
in self
|