Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / opentelemetry-sdk / default.nix
blobba5e7de5db83cd719b02f7cfeda2121f141b9843
1 { lib
2 , buildPythonPackage
3 , pythonOlder
4 , flaky
5 , hatchling
6 , opentelemetry-api
7 , opentelemetry-semantic-conventions
8 , opentelemetry-test-utils
9 , setuptools
10 , typing-extensions
11 , pytestCheckHook
14 let
15   self = buildPythonPackage {
16     inherit (opentelemetry-api) version src;
17     pname = "opentelemetry-sdk";
18     disabled = pythonOlder "3.7";
20     sourceRoot = "${opentelemetry-api.src.name}/opentelemetry-sdk";
22     format = "pyproject";
24     nativeBuildInputs = [
25       hatchling
26     ];
28     propagatedBuildInputs = [
29       opentelemetry-api
30       opentelemetry-semantic-conventions
31       setuptools
32       typing-extensions
33     ];
35     nativeCheckInputs = [
36       flaky
37       opentelemetry-test-utils
38       pytestCheckHook
39     ];
41     disabledTestPaths = [
42       "tests/performance/benchmarks/"
43     ];
45     pythonImportsCheck = [ "opentelemetry.sdk" ];
47     doCheck = false;
49     # Enable tests via passthru to avoid cyclic dependency with opentelemetry-test-utils.
50     passthru.tests.${self.pname} = self.overridePythonAttrs { doCheck = true; };
52     meta = opentelemetry-api.meta // {
53       homepage = "https://github.com/open-telemetry/opentelemetry-python/tree/main/opentelemetry-sdk";
54       description = "OpenTelemetry Python SDK";
55     };
56   };
57 in self