Unverified Commit c2d98428 authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

Merge pull request #330689 from fabaff/cyclonedx-python-lib-opt-deps

python312Packages.cyclonedx-python-lib: refactor
parents 1e00e903 6bf6e021
Loading
Loading
Loading
Loading
+16 −12
Original line number Diff line number Diff line
@@ -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
  ];

  nativeCheckInputs = [
    ddt
  passthru.optional-dependencies = {
    validation = [
      jsonschema
      lxml
    ];
    json-validation = [
      jsonschema
    ];
    xml-validation = [
      lxml
    ];
  };

  nativeCheckInputs = [
    ddt
    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";