Unverified Commit 99feb072 authored by jopejoe1's avatar jopejoe1 Committed by GitHub
Browse files

python3Packages.scancode-toolkit: pre-generate index file (#442675)

parents 52b0c803 869c1762
Loading
Loading
Loading
Loading
+7 −9
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@
  typecode,
  typecode-libmagic,
  urlpy,
  writableTmpDirAsHomeHook,
  xmltodict,
  zipp,
}:
@@ -130,22 +131,19 @@ buildPythonPackage rec {
  ]
  ++ lib.optionals (pythonOlder "3.9") [ zipp ];

  nativeBuildInputs = [
    writableTmpDirAsHomeHook
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  # Importing scancode needs a writeable home, and preCheck happens in between
  # pythonImportsCheckPhase and pytestCheckPhase.
  # Pre-genrating license index
  postInstall = ''
    export HOME=$(mktemp -d)
    $out/bin/scancode-reindex-licenses
  '';

  pythonImportsCheck = [ "scancode" ];

  disabledTestPaths = [
    # Tests are outdated
    "src/formattedcode/output_spdx.py"
    "src/scancode/cli.py"
  ];

  # Takes a long time and doesn't appear to do anything
  dontStrip = true;