at 25.11-pre 1.4 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonAtLeast, 6 pythonOlder, 7 attrs, 8 isodate, 9 python-dateutil, 10 rfc3986, 11 uritemplate, 12 pytestCheckHook, 13 pytest-mock, 14}: 15 16buildPythonPackage rec { 17 pname = "csvw"; 18 version = "1.11.0"; 19 format = "setuptools"; 20 21 disabled = pythonOlder "3.6"; 22 23 src = fetchFromGitHub { 24 owner = "cldf"; 25 repo = "csvw"; 26 rev = "v${version}"; 27 sha256 = "1393xwqawaxsflbq62vks92vv4zch8p6dd1mdvdi7j4vvf0zljkg"; 28 }; 29 30 propagatedBuildInputs = [ 31 attrs 32 isodate 33 python-dateutil 34 rfc3986 35 uritemplate 36 ]; 37 38 nativeCheckInputs = [ 39 pytestCheckHook 40 pytest-mock 41 ]; 42 43 patchPhase = '' 44 substituteInPlace setup.cfg \ 45 --replace "--cov" "" 46 ''; 47 48 disabledTests = 49 [ 50 # this test is flaky on darwin because it depends on the resolution of filesystem mtimes 51 # https://github.com/cldf/csvw/blob/45584ad63ff3002a9b3a8073607c1847c5cbac58/tests/test_db.py#L257 52 "test_write_file_exists" 53 ] 54 ++ lib.optionals (pythonAtLeast "3.10") [ 55 # https://github.com/cldf/csvw/issues/58 56 "test_roundtrip_escapechar" 57 "test_escapequote_escapecharquotechar_final" 58 "test_doubleQuote" 59 ]; 60 61 pythonImportsCheck = [ "csvw" ]; 62 63 meta = with lib; { 64 description = "CSV on the Web"; 65 homepage = "https://github.com/cldf/csvw"; 66 license = licenses.asl20; 67 maintainers = [ ]; 68 }; 69}