python3Packages.scancode-toolkit: 21.8.4 -> 30.1.0

main
Fabian Affolter 3 years ago
parent 570e2536e8
commit e531a5a712
  1. 172
      pkgs/development/python-modules/scancode-toolkit/default.nix

@ -1,105 +1,141 @@
{ lib
, fetchPypi
, attrs
, beautifulsoup4
, bitarray
, boolean-py
, buildPythonPackage
, isPy3k
, markupsafe
, chardet
, click
, typecode
, gemfileparser
, pefile
, fingerprints
, spdx-tools
, fasteners
, pycryptodome
, urlpy
, dparse
, jaraco_functools
, pkginfo
, colorama
, commoncode
, debian-inspector
, dparse
, extractcode
, extractcode-7z
, extractcode-libarchive
, fasteners
, fetchPypi
, fingerprints
, ftfy
, pyahocorasick
, colorama
, gemfileparser
, html5lib
, importlib-metadata
, intbitset
, jaraco_functools
, javaproperties
, jinja2
, jsonstreams
, license-expression
, lxml
, markupsafe
, packageurl-python
, pymaven-patch
, nltk
, packaging
, parameter-expansion-patched
, pefile
, pkginfo
, pluggy
, plugincode
, publicsuffix2
, pyahocorasick
, pycryptodome
, pygmars
, pygments
, bitarray
, jinja2
, javaproperties
, boolean-py
, license-expression
, extractcode-7z
, extractcode-libarchive
, typecode-libmagic
, pymaven-patch
, pytestCheckHook
, pythonOlder
, requests
, saneyaml
, spdx-tools
, text-unidecode
, toml
, typecode
, typecode-libmagic
, typing
, urlpy
, xmltodict
, zipp
}:
buildPythonPackage rec {
pname = "scancode-toolkit";
version = "21.8.4";
disabled = !isPy3k;
version = "30.1.0";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "c18340067244274c67e166f701c60e747e1d0bccb17efc99f277a4bc0a5a13c6";
sha256 = "sha256-UYQf+cBi2FmyZxIbQJo7vLjPuoePIMC8FugvoG1Ebj0=";
};
dontConfigure = true;
# https://github.com/nexB/scancode-toolkit/issues/2501
# * dparse2 is a "Temp fork for Python 2 support", but pdfminer requires
# Python 3, so it's "fine" to leave dparse2 unpackaged and use the "normal"
# version
# * ftfy was pinned for similar reasons (to support Python 2), but rather than
# packaging an older version, I figured it would be better to remove the
# erroneous (at least for our usage) version bound
# * bitarray's version bound appears to be unnecessary for similar reasons
postPatch = ''
substituteInPlace setup.cfg \
--replace "dparse2" "dparse" \
--replace "ftfy < 5.0.0" "ftfy" \
--replace "bitarray >= 0.8.1, < 1.0.0" "bitarray"
'';
propagatedBuildInputs = [
markupsafe
attrs
beautifulsoup4
bitarray
boolean-py
chardet
click
typecode
gemfileparser
pefile
fingerprints
spdx-tools
fasteners
pycryptodome
urlpy
dparse
jaraco_functools
pkginfo
colorama
commoncode
debian-inspector
dparse
extractcode
extractcode-7z
extractcode-libarchive
fasteners
fingerprints
ftfy
pyahocorasick
colorama
gemfileparser
html5lib
intbitset
jaraco_functools
javaproperties
jinja2
jsonstreams
license-expression
lxml
markupsafe
packageurl-python
pymaven-patch
nltk
packaging
parameter-expansion-patched
pefile
pkginfo
pluggy
plugincode
publicsuffix2
pyahocorasick
pycryptodome
pygmars
pygments
bitarray
jinja2
javaproperties
boolean-py
license-expression
extractcode-7z
extractcode-libarchive
pymaven-patch
requests
saneyaml
spdx-tools
text-unidecode
toml
typecode
typecode-libmagic
urlpy
xmltodict
zipp
] ++ lib.optionals (pythonOlder "3.9") [
importlib-metadata
] ++ lib.optionals (pythonOlder "3.7") [
typing
];
checkInputs = [
pytestCheckHook
];
postPatch = ''
substituteInPlace setup.cfg \
--replace "pluggy >= 0.12.0, < 1.0" "pluggy" \
--replace "pygmars >= 0.7.0" "pygmars" \
--replace "license_expression >= 21.6.14" "license_expression"
'';
# Importing scancode needs a writeable home, and preCheck happens in between
# pythonImportsCheckPhase and pytestCheckPhase.
postInstall = ''
@ -114,7 +150,7 @@ buildPythonPackage rec {
dontStrip = true;
meta = with lib; {
description = "A tool to scan code for license, copyright, package and their documented dependencies and other interesting facts";
description = "Tool to scan code for license, copyright, package and their documented dependencies and other interesting facts";
homepage = "https://github.com/nexB/scancode-toolkit";
license = with licenses; [ asl20 cc-by-40 ];
maintainers = teams.determinatesystems.members;

Loading…
Cancel
Save