1{ 2 lib, 3 stdenv, 4 attrs, 5 beautifulsoup4, 6 buildPythonPackage, 7 click, 8 fetchFromGitHub, 9 pytest-xdist, 10 pytestCheckHook, 11 pythonOlder, 12 requests, 13 saneyaml, 14 setuptools-scm, 15 text-unidecode, 16}: 17 18buildPythonPackage rec { 19 pname = "commoncode"; 20 version = "32.2.1"; 21 pyproject = true; 22 23 disabled = pythonOlder "3.8"; 24 25 src = fetchFromGitHub { 26 owner = "nexB"; 27 repo = "commoncode"; 28 tag = "v${version}"; 29 hash = "sha256-dCiERdNVup95UnvmJEzkpQsRvpk2eKqvwD6jkEBrXfE="; 30 }; 31 32 dontConfigure = true; 33 34 build-system = [ setuptools-scm ]; 35 36 pythonRelaxDeps = [ "beautifulsoup4" ]; 37 38 dependencies = [ 39 attrs 40 beautifulsoup4 41 click 42 requests 43 saneyaml 44 text-unidecode 45 ]; 46 47 nativeCheckInputs = [ 48 pytestCheckHook 49 pytest-xdist 50 ]; 51 52 disabledTests = 53 [ 54 # chinese character translates different into latin 55 "test_safe_path_posix_style_chinese_char" 56 # OSError: [Errno 84] Invalid or incomplete multibyte or wide character 57 "test_os_walk_can_walk_non_utf8_path_from_unicode_path" 58 "test_resource_iter_can_walk_non_utf8_path_from_unicode_path" 59 "test_walk_can_walk_non_utf8_path_from_unicode_path" 60 "test_resource_iter_can_walk_non_utf8_path_from_unicode_path_with_dirs" 61 ] 62 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 63 # expected result is tailored towards the quirks of upstream's 64 # CI environment on darwin 65 "test_searchable_paths" 66 ]; 67 68 pythonImportsCheck = [ "commoncode" ]; 69 70 meta = with lib; { 71 description = "Set of common utilities, originally split from ScanCode"; 72 homepage = "https://github.com/nexB/commoncode"; 73 changelog = "https://github.com/nexB/commoncode/blob/v${version}/CHANGELOG.rst"; 74 license = licenses.asl20; 75 maintainers = [ ]; 76 }; 77}