Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / lightning-utilities / default.nix
blob65d5f064ce575da28e87751a0c3d94f6521bd8a4
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
5 # build
6 , setuptools
8 # runtime
9 , packaging
10 , typing-extensions
12 # tests
13 , pytest-timeout
14 , pytestCheckHook
17 buildPythonPackage rec {
18   pname = "lightning-utilities";
19   version = "0.10.0";
20   format = "pyproject";
22   src = fetchFromGitHub {
23     owner = "Lightning-AI";
24     repo = "utilities";
25     rev = "refs/tags/v${version}";
26     hash = "sha256-lp/+ArgoMIa7Q2ufWghr8OYUMlFcj8123Et73ORNI5U=";
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     pytestCheckHook
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; [ hexa ];
75   };