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