28 buildPythonPackage rec {
33 disabled = pythonOlder "3.8";
35 src = fetchFromGitHub {
39 hash = "sha256:1y2sxzl9is3k1gmf9rvvxk9294dwbma1sh2ip56h7q1073346bv3";
47 optional-dependencies =
53 (if isPyPy then brotlicffi else brotli)
56 unicode = lib.optional (pythonOlder "3.13") unicodedata2;
60 (if isPyPy then munkres else scipy)
62 plot = [ matplotlib ];
64 type1 = lib.optional stdenv.hostPlatform.isDarwin xattr;
65 pathops = [ skia-pathops ];
66 repacker = [ uharfbuzz ];
69 extras // { all = lib.concatLists (lib.attrValues extras); };
73 # test suite fails with pytest>=8.0.1
74 # https://github.com/fonttools/fonttools/issues/3458
81 # "interpolatable" is not included because it only contains 2 tests at the time of writing but adds 270 extra dependencies
84 ++ lib.optionals (!skia-pathops.meta.broken) [
88 ) optional-dependencies
91 pythonImportsCheck = [ "fontTools" ];
94 # tests want to execute the "fonttools" executable from $PATH
95 export PATH="$out/bin:$PATH"
98 # Timestamp tests have timing issues probably related
99 # to our file timestamp normalization
101 "test_recalc_timestamp_ttf"
102 "test_recalc_timestamp_otf"
103 "test_ttcompile_timestamp_calcs"
106 disabledTestPaths = [
107 # avoid test which depend on fs and matplotlib
108 # fs and matplotlib were removed to prevent strong cyclic dependencies
109 "Tests/misc/plistlib_test.py"
113 # test suite fails with pytest>=8.0.1
114 # https://github.com/fonttools/fonttools/issues/3458
115 "Tests/ttLib/woff2_test.py"
116 "Tests/ttx/ttx_test.py"
120 homepage = "https://github.com/fonttools/fonttools";
121 description = "Library to manipulate font files from Python";
122 changelog = "https://github.com/fonttools/fonttools/blob/${version}/NEWS.rst";
123 license = licenses.mit;
124 maintainers = [ maintainers.sternenseemann ];