1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pythonOlder,
6
7 # build-system
8 setuptools,
9 setuptools-scm,
10
11 # dependencies
12 fonttools,
13 defcon,
14 fontmath,
15 booleanoperations,
16
17 # tests
18 python,
19}:
20
21buildPythonPackage rec {
22 pname = "fontparts";
23 version = "0.12.3";
24 pyproject = true;
25
26 disabled = pythonOlder "3.7";
27
28 src = fetchPypi {
29 inherit pname version;
30 hash = "sha256-lmzLIqP1qFFqkVNzhFlo/C6kOmuddJ3U1eYLNN2h+d4=";
31 extension = "zip";
32 };
33
34 build-system = [
35 setuptools
36 setuptools-scm
37 ];
38
39 dependencies =
40 [
41 booleanoperations
42 defcon
43 fontmath
44 fonttools
45 ]
46 ++ defcon.optional-dependencies.pens
47 ++ fonttools.optional-dependencies.ufo
48 ++ fonttools.optional-dependencies.lxml
49 ++ fonttools.optional-dependencies.unicode;
50
51 checkPhase = ''
52 runHook preCheck
53 ${python.interpreter} Lib/fontParts/fontshell/test.py
54 runHook postCheck
55 '';
56
57 meta = with lib; {
58 description = "API for interacting with the parts of fonts during the font development process";
59 homepage = "https://github.com/robotools/fontParts";
60 changelog = "https://github.com/robotools/fontParts/releases/tag/${version}";
61 license = licenses.mit;
62 maintainers = [ maintainers.sternenseemann ];
63 };
64}