mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-16 17:14:00 +00:00
Merge pull request #330689 from fabaff/cyclonedx-python-lib-opt-deps
python312Packages.cyclonedx-python-lib: refactor
This commit is contained in:
commit
c2d9842836
@ -35,8 +35,9 @@ buildPythonPackage rec {
|
||||
hash = "sha256-yBBtE9DfHzUNXHMCo3KoUAAsvkBshczmVtMCUTtQ9zg=";
|
||||
};
|
||||
|
||||
build-system = [ poetry-core ];
|
||||
pythonRelaxDeps = [ "py-serializable" ];
|
||||
|
||||
build-system = [ poetry-core ];
|
||||
|
||||
dependencies = [
|
||||
importlib-metadata
|
||||
@ -51,18 +52,27 @@ buildPythonPackage rec {
|
||||
types-toml
|
||||
];
|
||||
|
||||
passthru.optional-dependencies = {
|
||||
validation = [
|
||||
jsonschema
|
||||
lxml
|
||||
];
|
||||
json-validation = [
|
||||
jsonschema
|
||||
];
|
||||
xml-validation = [
|
||||
lxml
|
||||
];
|
||||
};
|
||||
|
||||
nativeCheckInputs = [
|
||||
ddt
|
||||
jsonschema
|
||||
lxml
|
||||
pytestCheckHook
|
||||
xmldiff
|
||||
];
|
||||
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
||||
|
||||
pythonImportsCheck = [ "cyclonedx" ];
|
||||
|
||||
pythonRelaxDeps = [ "py-serializable" ];
|
||||
|
||||
preCheck = ''
|
||||
export PYTHONPATH=tests''${PYTHONPATH+:$PYTHONPATH}
|
||||
'';
|
||||
@ -82,12 +92,6 @@ buildPythonPackage rec {
|
||||
"tests/test_output_xml.py"
|
||||
];
|
||||
|
||||
passthru.optional-dependencies = {
|
||||
validation = [
|
||||
jsonschema
|
||||
];
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python library for generating CycloneDX SBOMs";
|
||||
homepage = "https://github.com/CycloneDX/cyclonedx-python-lib";
|
||||
|
Loading…
Reference in New Issue
Block a user