Merge pull request #271877 from fabaff/scancode-fix

python311Packages.scancode-toolkit: 32.0.6 -> 32.0.8
This commit is contained in:
Fabian Affolter 2023-12-03 20:13:43 +01:00 committed by GitHub
commit 411d94a1b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,7 +16,6 @@
, extractcode-libarchive
, fasteners
, fetchPypi
, fetchpatch
, fingerprints
, ftfy
, gemfileparser2
@ -48,12 +47,12 @@
, pythonOlder
, requests
, saneyaml
, setuptools
, spdx-tools
, text-unidecode
, toml
, typecode
, typecode-libmagic
, typing
, urlpy
, xmltodict
, zipp
@ -61,17 +60,22 @@
buildPythonPackage rec {
pname = "scancode-toolkit";
version = "32.0.6";
version = "32.0.8";
pyproject = true;
disabled = pythonOlder "3.6";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-suqk7LOnZgSJGlaHq81LDOSCHZWdsJOUbma6MEpHxSM=";
hash = "sha256-W6Ev1MV8cZU4bauAfmuZsBzMJKz7xpw8siO3Afn5mc8=";
};
dontConfigure = true;
nativeBuildInputs = [
setuptools
];
propagatedBuildInputs = [
attrs
beautifulsoup4
@ -126,33 +130,12 @@ buildPythonPackage rec {
xmltodict
] ++ lib.optionals (pythonOlder "3.9") [
zipp
] ++ lib.optionals (pythonOlder "3.7") [
typing
];
nativeCheckInputs = [
pytestCheckHook
];
patches = [
(fetchpatch {
name = "${pname}-allow-stable-spdx-tools.patch";
url = "https://github.com/nexB/scancode-toolkit/commit/d89ab6584d3df6b7eb1d1394559e9d967d6db6ae.patch";
includes = [ "src/*" ];
hash = "sha256-AU3vJlOxmCy3yvkupVaAVxAKxJI3ymXEk+A5DWSkfOM=";
})
];
postPatch = ''
substituteInPlace setup.cfg \
--replace "pdfminer.six >= 20200101" "pdfminer.six" \
--replace "pluggy >= 0.12.0, < 1.0" "pluggy" \
--replace "pygmars >= 0.7.0" "pygmars" \
--replace "license_expression >= 21.6.14" "license_expression" \
--replace "intbitset >= 2.3.0, < 3.0" "intbitset" \
--replace "spdx_tools == 0.7.0a3" "spdx_tools"
'';
# Importing scancode needs a writeable home, and preCheck happens in between
# pythonImportsCheckPhase and pytestCheckPhase.
postInstall = ''
@ -163,7 +146,13 @@ buildPythonPackage rec {
"scancode"
];
# takes a long time and doesn't appear to do anything
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;
meta = with lib; {