1{ lib
2, attrs
3, buildPythonPackage
4, colorlog
5, csvw
6, fetchFromGitHub
7, git
8, isPy27
9, lxml
10, markdown
11, markupsafe
12, mock
13, postgresql
14, pylatexenc
15, pytest-mock
16, pytestCheckHook
17, python-dateutil
18, tabulate
19}:
20
21buildPythonPackage rec {
22 pname = "clldutils";
23 version = "3.19.0";
24 disabled = isPy27;
25
26 src = fetchFromGitHub {
27 owner = "clld";
28 repo = pname;
29 rev = "v${version}";
30 hash = "sha256-dva0lbbTxvETDPkACxpI3PPzWh5gz87Fv6W3lTjNv3Q=";
31 };
32
33 patchPhase = ''
34 substituteInPlace setup.cfg --replace "--cov" ""
35 '';
36
37 propagatedBuildInputs = [
38 attrs
39 colorlog
40 csvw
41 lxml
42 markdown
43 markupsafe
44 pylatexenc
45 python-dateutil
46 tabulate
47 ];
48
49 nativeCheckInputs = [
50 mock
51 postgresql
52 pytest-mock
53 pytestCheckHook
54 git
55 ];
56
57 disabledTests = [
58 # uses pytest.approx which is not supported in a boolean context in pytest7
59 "test_to_dec"
60 "test_roundtrip"
61 ];
62
63 meta = with lib; {
64 description = "Utilities for clld apps without the overhead of requiring pyramid, rdflib et al";
65 homepage = "https://github.com/clld/clldutils";
66 license = licenses.asl20;
67 maintainers = with maintainers; [ melling ];
68 };
69}