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