2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
attrs,
|
|
|
|
beautifulsoup4,
|
|
|
|
buildPythonPackage,
|
|
|
|
click,
|
2024-07-27 06:49:29 +00:00
|
|
|
fetchFromGitHub,
|
2024-06-05 15:53:02 +00:00
|
|
|
pytest-xdist,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
requests,
|
|
|
|
saneyaml,
|
|
|
|
setuptools-scm,
|
|
|
|
text-unidecode,
|
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";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "32.0.0";
|
2024-07-27 06:49:29 +00:00
|
|
|
pyproject = true;
|
2021-10-11 16:52:03 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2021-04-25 03:57:28 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nexB";
|
|
|
|
repo = "commoncode";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-yqvsBJHrxVkSqp3QnYmHDJr3sef/g4pkSlkSioYuOc4=";
|
2021-04-25 03:57:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
build-system = [ setuptools-scm ];
|
2021-04-25 03:57:28 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
dependencies = [
|
2021-04-25 03:57:28 +00:00
|
|
|
attrs
|
2021-10-11 16:52:03 +00:00
|
|
|
beautifulsoup4
|
|
|
|
click
|
|
|
|
requests
|
2021-04-25 03:57:28 +00:00
|
|
|
saneyaml
|
|
|
|
text-unidecode
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-04-25 03:57:28 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pytest-xdist
|
|
|
|
];
|
2022-01-19 23:45:15 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
disabledTests =
|
|
|
|
[
|
|
|
|
# chinese character translates different into latin
|
|
|
|
"test_safe_path_posix_style_chinese_char"
|
|
|
|
# OSError: [Errno 84] Invalid or incomplete multibyte or wide character
|
|
|
|
"test_os_walk_can_walk_non_utf8_path_from_unicode_path"
|
|
|
|
"test_resource_iter_can_walk_non_utf8_path_from_unicode_path"
|
|
|
|
"test_walk_can_walk_non_utf8_path_from_unicode_path"
|
|
|
|
"test_resource_iter_can_walk_non_utf8_path_from_unicode_path_with_dirs"
|
|
|
|
]
|
2024-09-26 11:04:55 +00:00
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
2024-06-05 15:53:02 +00:00
|
|
|
# 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
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "commoncode" ];
|
2021-04-25 03:57:28 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Set of common utilities, originally split from ScanCode";
|
2021-04-25 03:57:28 +00:00
|
|
|
homepage = "https://github.com/nexB/commoncode";
|
2023-10-09 19:29:22 +00:00
|
|
|
changelog = "https://github.com/nexB/commoncode/blob/v${version}/CHANGELOG.rst";
|
2021-04-25 03:57:28 +00:00
|
|
|
license = licenses.asl20;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2021-04-25 03:57:28 +00:00
|
|
|
};
|
|
|
|
}
|