2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonAtLeast,
|
|
|
|
pythonOlder,
|
|
|
|
attrs,
|
|
|
|
isodate,
|
|
|
|
python-dateutil,
|
|
|
|
rfc3986,
|
|
|
|
uritemplate,
|
|
|
|
pytestCheckHook,
|
|
|
|
pytest-mock,
|
2020-09-25 04:45:31 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "csvw";
|
2021-05-20 23:08:51 +00:00
|
|
|
version = "1.11.0";
|
2022-02-10 20:34:41 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cldf";
|
|
|
|
repo = "csvw";
|
|
|
|
rev = "v${version}";
|
2021-05-20 23:08:51 +00:00
|
|
|
sha256 = "1393xwqawaxsflbq62vks92vv4zch8p6dd1mdvdi7j4vvf0zljkg";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
attrs
|
|
|
|
isodate
|
2021-07-04 02:40:35 +00:00
|
|
|
python-dateutil
|
2020-09-25 04:45:31 +00:00
|
|
|
rfc3986
|
|
|
|
uritemplate
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2020-09-25 04:45:31 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pytest-mock
|
|
|
|
];
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "--cov" ""
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
disabledTests =
|
|
|
|
[
|
|
|
|
# this test is flaky on darwin because it depends on the resolution of filesystem mtimes
|
|
|
|
# https://github.com/cldf/csvw/blob/45584ad63ff3002a9b3a8073607c1847c5cbac58/tests/test_db.py#L257
|
|
|
|
"test_write_file_exists"
|
|
|
|
]
|
|
|
|
++ lib.optionals (pythonAtLeast "3.10") [
|
|
|
|
# https://github.com/cldf/csvw/issues/58
|
|
|
|
"test_roundtrip_escapechar"
|
|
|
|
"test_escapequote_escapecharquotechar_final"
|
|
|
|
"test_doubleQuote"
|
|
|
|
];
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "csvw" ];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "CSV on the Web";
|
|
|
|
homepage = "https://github.com/cldf/csvw";
|
|
|
|
license = licenses.asl20;
|
2024-01-13 08:15:51 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
}
|