at master 1.8 kB view raw
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 # chinese character translates different into latin 54 "test_safe_path_posix_style_chinese_char" 55 # OSError: [Errno 84] Invalid or incomplete multibyte or wide character 56 "test_os_walk_can_walk_non_utf8_path_from_unicode_path" 57 "test_resource_iter_can_walk_non_utf8_path_from_unicode_path" 58 "test_walk_can_walk_non_utf8_path_from_unicode_path" 59 "test_resource_iter_can_walk_non_utf8_path_from_unicode_path_with_dirs" 60 ] 61 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 62 # expected result is tailored towards the quirks of upstream's 63 # CI environment on darwin 64 "test_searchable_paths" 65 ]; 66 67 pythonImportsCheck = [ "commoncode" ]; 68 69 meta = with lib; { 70 description = "Set of common utilities, originally split from ScanCode"; 71 homepage = "https://github.com/nexB/commoncode"; 72 changelog = "https://github.com/nexB/commoncode/blob/v${version}/CHANGELOG.rst"; 73 license = licenses.asl20; 74 maintainers = [ ]; 75 }; 76}