Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / lightning-utilities / default.nix
blob3af06818b8ee857b28bdbe1e8746479e169b4d14
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
5 # build
6 , setuptools
8 # runtime
9 , packaging
10 , typing-extensions
12 # tests
13 , pytest-timeout
14 , pytest7CheckHook
17 buildPythonPackage rec {
18   pname = "lightning-utilities";
19   version = "0.10.1";
20   format = "pyproject";
22   src = fetchFromGitHub {
23     owner = "Lightning-AI";
24     repo = "utilities";
25     rev = "refs/tags/v${version}";
26     hash = "sha256-kP7BllA9FR/nMNTxRCxmG6IJYHz/Nxqb1HoF9KxuKl8=";
27   };
29   nativeBuildInputs = [
30     setuptools
31   ];
33   propagatedBuildInputs = [
34     packaging
35     typing-extensions
36   ];
38   pythonImportsCheck = [
39     "lightning_utilities"
40   ];
42   nativeCheckInputs = [
43     pytest-timeout
44     pytest7CheckHook
45   ];
47   disabledTests = [
48     "lightning_utilities.core.enums.StrEnum"
49     "lightning_utilities.core.imports.RequirementCache"
50     "lightning_utilities.core.imports.compare_version"
51     "lightning_utilities.core.imports.get_dependency_min_version_spec"
52     # weird doctests fail on imports, but providing the dependency
53     # fails another test
54     "lightning_utilities.core.imports.ModuleAvailableCache"
55     "lightning_utilities.core.imports.requires"
56   ];
58   disabledTestPaths = [
59     "docs"
60     # doctests that expect docs.txt in the wrong location
61     "src/lightning_utilities/install/requirements.py"
62   ];
64   pytestFlagsArray = [
65     # warns about distutils removal in python 3.12
66     "-W" "ignore::DeprecationWarning"
67   ];
69   meta = with lib; {
70     changelog = "https://github.com/Lightning-AI/utilities/releases/tag/v${version}";
71     description = "Common Python utilities and GitHub Actions in Lightning Ecosystem";
72     homepage = "https://github.com/Lightning-AI/utilities";
73     license = licenses.asl20;
74     maintainers = with maintainers; [ ];
75   };