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