2021-04-25 03:57:28 +00:00
|
|
|
{ lib
|
2021-12-06 16:07:01 +00:00
|
|
|
, stdenv
|
2021-10-11 16:52:03 +00:00
|
|
|
, attrs
|
|
|
|
, beautifulsoup4
|
2021-04-25 03:57:28 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, click
|
2021-10-11 16:52:03 +00:00
|
|
|
, fetchPypi
|
2021-04-25 03:57:28 +00:00
|
|
|
, intbitset
|
2021-10-11 16:52:03 +00:00
|
|
|
, pytest-xdist
|
|
|
|
, pytestCheckHook
|
2022-01-19 23:45:15 +00:00
|
|
|
, pythonAtLeast
|
2021-10-11 16:52:03 +00:00
|
|
|
, pythonOlder
|
|
|
|
, requests
|
2021-04-25 03:57:28 +00:00
|
|
|
, saneyaml
|
2021-10-11 16:52:03 +00:00
|
|
|
, setuptools-scm
|
2021-04-25 03:57:28 +00:00
|
|
|
, text-unidecode
|
2021-10-11 16:52:03 +00:00
|
|
|
, typing
|
2021-04-25 03:57:28 +00:00
|
|
|
}:
|
2021-10-11 16:52:03 +00:00
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "commoncode";
|
2021-10-11 16:52:03 +00:00
|
|
|
version = "30.0.0";
|
2022-01-19 23:45:15 +00:00
|
|
|
format = "setuptools";
|
2021-10-11 16:52:03 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2021-04-25 03:57:28 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-10-11 16:52:03 +00:00
|
|
|
sha256 = "sha256-6SeU4u6pfDuGCgCYAO5fdbWBxW9XN3WvM8j6DwUlFwM=";
|
2021-04-25 03:57:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
attrs
|
2021-10-11 16:52:03 +00:00
|
|
|
beautifulsoup4
|
|
|
|
click
|
2021-04-25 03:57:28 +00:00
|
|
|
intbitset
|
2021-10-11 16:52:03 +00:00
|
|
|
requests
|
2021-04-25 03:57:28 +00:00
|
|
|
saneyaml
|
|
|
|
text-unidecode
|
2021-10-11 16:52:03 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.7") [
|
|
|
|
typing
|
2021-04-25 03:57:28 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
pytest-xdist
|
|
|
|
];
|
2022-01-19 23:45:15 +00:00
|
|
|
|
2021-12-06 16:07: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-25 03:57:28 +00:00
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
disabledTestPaths = lib.optionals (pythonAtLeast "3.10") [
|
|
|
|
# https://github.com/nexB/commoncode/issues/36
|
|
|
|
"src/commoncode/fetch.py"
|
|
|
|
];
|
|
|
|
|
2021-04-25 03:57:28 +00: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;
|
|
|
|
};
|
|
|
|
}
|