1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonOlder
5, brotlipy
6, zopfli
7, fs
8, lxml
9, scipy
10, munkres
11, unicodedata2
12, sympy
13, matplotlib
14, reportlab
15, sphinx
16, pytest
17, pytest-randomly
18, glibcLocales
19}:
20
21buildPythonPackage rec {
22 pname = "fonttools";
23 version = "4.21.1";
24 disabled = pythonOlder "3.6";
25
26 src = fetchFromGitHub {
27 owner = pname;
28 repo = pname;
29 rev = version;
30 sha256 = "1x9qrg6ppqhm5214ymwvn0r34qdz8pqvyxd0sj7rkp06wa757z2i";
31 };
32
33 # all dependencies are optional, but
34 # we run the checks with them
35 checkInputs = [
36 pytest
37 pytest-randomly
38 glibcLocales
39 # etree extra
40 lxml
41 # ufo extra
42 fs
43 # woff extra
44 brotlipy
45 zopfli
46 # unicode extra
47 unicodedata2
48 # interpolatable extra
49 scipy
50 munkres
51 # symfont
52 sympy
53 # varLib
54 matplotlib
55 # pens
56 reportlab
57 sphinx
58 ];
59
60 preCheck = ''
61 export LC_ALL="en_US.UTF-8"
62 '';
63
64 # avoid timing issues with timestamps in subset_test.py and ttx_test.py
65 checkPhase = ''
66 pytest Tests fontTools \
67 -k 'not ttcompile_timestamp_calcs and not recalc_timestamp'
68 '';
69
70 meta = with lib; {
71 homepage = "https://github.com/fonttools/fonttools";
72 description = "A library to manipulate font files from Python";
73 license = licenses.mit;
74 maintainers = [ maintainers.sternenseemann ];
75 };
76}