ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / cyclonedx-python-lib / default.nix
bloba2d94a8dbaaa9e47c42fac7014b2002c8eb31000
1 { lib
2 , buildPythonPackage
3 , ddt
4 , fetchFromGitHub
5 , importlib-metadata
6 , jsonschema
7 , lxml
8 , packageurl-python
9 , poetry-core
10 , pytestCheckHook
11 , python
12 , pythonOlder
13 , requirements-parser
14 , sortedcontainers
15 , setuptools
16 , toml
17 , types-setuptools
18 , types-toml
19 , xmldiff
22 buildPythonPackage rec {
23   pname = "cyclonedx-python-lib";
24   version = "3.1.0";
25   format = "pyproject";
27   disabled = pythonOlder "3.9";
29   src = fetchFromGitHub {
30     owner = "CycloneDX";
31     repo = pname;
32     rev = "refs/tags/v${version}";
33     hash = "sha256-pbwhjxlEdne426CiUORSM8w6MXpgpjMWoH37TnXxA5s=";
34   };
36   nativeBuildInputs = [
37     poetry-core
38   ];
40   propagatedBuildInputs = [
41     importlib-metadata
42     packageurl-python
43     requirements-parser
44     setuptools
45     sortedcontainers
46     toml
47     types-setuptools
48     types-toml
49   ];
51   checkInputs = [
52     ddt
53     jsonschema
54     lxml
55     pytestCheckHook
56     xmldiff
57   ];
59   pythonImportsCheck = [
60     "cyclonedx"
61   ];
63   preCheck = ''
64     export PYTHONPATH=tests''${PYTHONPATH+:$PYTHONPATH}
65   '';
67   pytestFlagsArray = [ "tests/" ];
69   disabledTests = [
70     # These tests require network access.
71     "test_bom_v1_3_with_metadata_component"
72     "test_bom_v1_4_with_metadata_component"
73   ];
75   meta = with lib; {
76     description = "Python library for generating CycloneDX SBOMs";
77     homepage = "https://github.com/CycloneDX/cyclonedx-python-lib";
78     license = with licenses; [ asl20 ];
79     maintainers = with maintainers; [ fab ];
80   };