2021-04-20 04:30:17 +01:00
|
|
|
{ lib
|
2021-11-07 16:34:01 +00:00
|
|
|
, stdenv
|
2021-10-09 09:55:32 +01:00
|
|
|
, attrs
|
|
|
|
, beautifulsoup4
|
2021-04-20 04:30:17 +01:00
|
|
|
, buildPythonPackage
|
|
|
|
, click
|
2021-10-09 09:55:32 +01:00
|
|
|
, fetchPypi
|
2021-04-20 04:30:17 +01:00
|
|
|
, intbitset
|
2021-10-09 09:55:32 +01:00
|
|
|
, pytest-xdist
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, requests
|
2021-04-20 04:30:17 +01:00
|
|
|
, saneyaml
|
2021-10-09 09:55:32 +01:00
|
|
|
, setuptools-scm
|
2021-04-20 04:30:17 +01:00
|
|
|
, text-unidecode
|
2021-10-09 09:55:32 +01:00
|
|
|
, typing
|
2021-04-20 04:30:17 +01:00
|
|
|
}:
|
2021-10-09 09:55:32 +01:00
|
|
|
|
2021-04-20 04:30:17 +01:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "commoncode";
|
2021-10-09 09:55:32 +01:00
|
|
|
version = "30.0.0";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2021-04-20 04:30:17 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-10-09 09:55:32 +01:00
|
|
|
sha256 = "sha256-6SeU4u6pfDuGCgCYAO5fdbWBxW9XN3WvM8j6DwUlFwM=";
|
2021-04-20 04:30:17 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
attrs
|
2021-10-09 09:55:32 +01:00
|
|
|
beautifulsoup4
|
|
|
|
click
|
2021-04-20 04:30:17 +01:00
|
|
|
intbitset
|
2021-10-09 09:55:32 +01:00
|
|
|
requests
|
2021-04-20 04:30:17 +01:00
|
|
|
saneyaml
|
|
|
|
text-unidecode
|
2021-10-09 09:55:32 +01:00
|
|
|
] ++ lib.optionals (pythonOlder "3.7") [
|
|
|
|
typing
|
2021-04-20 04:30:17 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
pytest-xdist
|
|
|
|
];
|
2021-11-07 16:34:01 +00:00
|
|
|
disabledTests = lib.optionals stdenv.isDarwin [
|
|
|
|
# expected result is tailored towards the quirks of upstream's
|
|
|
|
# CI environment on darwin
|
|
|
|
"test_searchable_paths"
|
|
|
|
];
|
2021-04-20 04:30:17 +01:00
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"commoncode"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A set of common utilities, originally split from ScanCode";
|
|
|
|
homepage = "https://github.com/nexB/commoncode";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = teams.determinatesystems.members;
|
|
|
|
};
|
|
|
|
}
|