1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 protobuf,
6 pytestCheckHook,
7 pythonOlder,
8 regex,
9 setuptools,
10 setuptools-scm,
11 uharfbuzz,
12 youseedee,
13}:
14
15buildPythonPackage rec {
16 pname = "gflanguages";
17 version = "0.7.7";
18 pyproject = true;
19
20 disabled = pythonOlder "3.7";
21
22 src = fetchPypi {
23 inherit pname version;
24 hash = "sha256-JR+lmwGhPR/RoskpouNzGOE9kRgvSGgzx5Xa196k0eA=";
25 };
26
27 # Relax the dependency on protobuf 3. Other packages in the Google Fonts
28 # ecosystem have begun upgrading from protobuf 3 to protobuf 4,
29 # so we need to use protobuf 4 here as well to avoid a conflict
30 # in the closure of fontbakery. It seems to be compatible enough.
31 pythonRelaxDeps = [ "protobuf" ];
32
33 env.PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION = "python";
34
35 build-system = [
36 setuptools
37 setuptools-scm
38 ];
39
40 dependencies = [
41 protobuf
42 regex
43 ];
44
45 nativeCheckInputs = [
46 pytestCheckHook
47 regex
48 uharfbuzz
49 youseedee
50 ];
51
52 pythonImportsCheck = [ "gflanguages" ];
53
54 disabledTests = [
55 # AssertionError
56 "test_exemplars_are_in_script"
57 "test_sample_texts_are_in_script"
58 ];
59
60 meta = with lib; {
61 description = "Python library for Google Fonts language metadata";
62 homepage = "https://github.com/googlefonts/lang";
63 changelog = "https://github.com/googlefonts/lang/releases/tag/v${version}";
64 license = licenses.asl20;
65 maintainers = with maintainers; [ danc86 ];
66 };
67}