python312Packages.afdko: refactor (#349610)

authored by Fabian Affolter and committed by GitHub 6d150cab 46dccd69

+108 -70
+40 -45
pkgs/development/python-modules/afdko/default.nix
··· 1 { 2 lib, 3 stdenv, 4 buildPythonPackage, 5 - fetchFromGitHub, 6 - pythonOlder, 7 - fonttools, 8 defcon, 9 - lxml, 10 - fs, 11 - unicodedata2, 12 - zopfli, 13 - brotlipy, 14 fontpens, 15 - brotli, 16 - fontmath, 17 mutatormath, 18 - booleanoperations, 19 - ufoprocessor, 20 - ufonormalizer, 21 - tqdm, 22 - setuptools-scm, 23 - scikit-build, 24 - cmake, 25 ninja, 26 - antlr4_9, 27 - libxml2, 28 pytestCheckHook, 29 - # Enables some expensive tests, useful for verifying an update 30 runAllTests ? false, 31 - afdko, 32 }: 33 34 buildPythonPackage rec { 35 pname = "afdko"; 36 version = "4.0.1"; 37 - format = "pyproject"; 38 39 - disabled = pythonOlder "3.7"; 40 41 src = fetchFromGitHub { 42 owner = "adobe-type-tools"; 43 - repo = pname; 44 rev = "refs/tags/${version}"; 45 hash = "sha256-I5GKPkbyQX8QNSZgNB3wPKdWwpx8Xkklesu1M7nhgp8="; 46 }; 47 48 nativeBuildInputs = [ 49 - setuptools-scm 50 scikit-build 51 cmake 52 ninja ··· 78 # setup.py will always (re-)execute cmake in buildPhase 79 dontConfigure = true; 80 81 - propagatedBuildInputs = [ 82 - booleanoperations 83 - fonttools 84 - lxml # fonttools[lxml], defcon[lxml] extra 85 - fs # fonttools[ufo] extra 86 - unicodedata2 # fonttools[unicode] extra 87 - brotlipy # fonttools[woff] extra 88 - zopfli # fonttools[woff] extra 89 - fontpens 90 - brotli 91 - defcon 92 - fontmath 93 - mutatormath 94 - ufoprocessor 95 - ufonormalizer 96 - tqdm 97 - ]; 98 99 # Use system libxml2 100 FORCE_SYSTEM_LIBXML2 = true; ··· 116 "test_waterfallplot" 117 ] 118 ++ lib.optionals (stdenv.cc.isGNU) [ 119 - # broke in the gcc 13 → 14 update 120 "test_dump" 121 "test_input_formats" 122 "test_other_input_formats" ··· 146 }; 147 148 meta = with lib; { 149 - changelog = "https://github.com/adobe-type-tools/afdko/blob/${version}/NEWS.md"; 150 description = "Adobe Font Development Kit for OpenType"; 151 homepage = "https://adobe-type-tools.github.io/afdko"; 152 license = licenses.asl20; 153 - maintainers = [ maintainers.sternenseemann ]; 154 }; 155 }
··· 1 { 2 lib, 3 stdenv, 4 + # Enables some expensive tests, useful for verifying an update 5 + afdko, 6 + antlr4_9, 7 + booleanoperations, 8 buildPythonPackage, 9 + cmake, 10 defcon, 11 + fetchFromGitHub, 12 + fontmath, 13 fontpens, 14 + fonttools, 15 + libxml2, 16 mutatormath, 17 ninja, 18 pytestCheckHook, 19 + pythonOlder, 20 runAllTests ? false, 21 + scikit-build, 22 + setuptools-scm, 23 + tqdm, 24 + ufonormalizer, 25 + ufoprocessor, 26 }: 27 28 buildPythonPackage rec { 29 pname = "afdko"; 30 version = "4.0.1"; 31 + pyproject = true; 32 33 + disabled = pythonOlder "3.8"; 34 35 src = fetchFromGitHub { 36 owner = "adobe-type-tools"; 37 + repo = "afdko"; 38 rev = "refs/tags/${version}"; 39 hash = "sha256-I5GKPkbyQX8QNSZgNB3wPKdWwpx8Xkklesu1M7nhgp8="; 40 }; 41 42 + build-system = [ setuptools-scm ]; 43 + 44 nativeBuildInputs = [ 45 scikit-build 46 cmake 47 ninja ··· 73 # setup.py will always (re-)execute cmake in buildPhase 74 dontConfigure = true; 75 76 + dependencies = 77 + [ 78 + booleanoperations 79 + defcon 80 + fontmath 81 + fontpens 82 + fonttools 83 + mutatormath 84 + tqdm 85 + ufonormalizer 86 + ufoprocessor 87 + ] 88 + ++ defcon.optional-dependencies.lxml 89 + ++ fonttools.optional-dependencies.lxml 90 + ++ fonttools.optional-dependencies.ufo 91 + ++ fonttools.optional-dependencies.unicode 92 + ++ fonttools.optional-dependencies.woff; 93 94 # Use system libxml2 95 FORCE_SYSTEM_LIBXML2 = true; ··· 111 "test_waterfallplot" 112 ] 113 ++ lib.optionals (stdenv.cc.isGNU) [ 114 + # broke in the gcc 13 -> 14 update 115 "test_dump" 116 "test_input_formats" 117 "test_other_input_formats" ··· 141 }; 142 143 meta = with lib; { 144 description = "Adobe Font Development Kit for OpenType"; 145 + changelog = "https://github.com/adobe-type-tools/afdko/blob/${version}/NEWS.md"; 146 homepage = "https://adobe-type-tools.github.io/afdko"; 147 license = licenses.asl20; 148 + maintainers = with maintainers; [ sternenseemann ]; 149 }; 150 }
+3 -1
pkgs/development/python-modules/axisregistry/default.nix
··· 5 fonttools, 6 protobuf, 7 pytestCheckHook, 8 - setuptools-scm, 9 pythonOlder, 10 }: 11 12 buildPythonPackage rec { ··· 26 # so we need to use protobuf 4 here as well to avoid a conflict 27 # in the closure of fontbakery. It seems to be compatible enough. 28 pythonRelaxDeps = [ "protobuf" ]; 29 30 build-system = [ setuptools-scm ]; 31
··· 5 fonttools, 6 protobuf, 7 pytestCheckHook, 8 pythonOlder, 9 + setuptools-scm, 10 }: 11 12 buildPythonPackage rec { ··· 26 # so we need to use protobuf 4 here as well to avoid a conflict 27 # in the closure of fontbakery. It seems to be compatible enough. 28 pythonRelaxDeps = [ "protobuf" ]; 29 + 30 + env.PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION = "python"; 31 32 build-system = [ setuptools-scm ]; 33
+7 -4
pkgs/development/python-modules/diffenator2/default.nix
··· 27 28 buildPythonPackage rec { 29 pname = "diffenator2"; 30 - version = "0.4.3"; 31 pyproject = true; 32 33 src = fetchFromGitHub { 34 owner = "googlefonts"; 35 repo = "diffenator2"; 36 rev = "refs/tags/v${version}"; 37 - hash = "sha256-zeNcNR14ieY6Inp4kOwIPXd6S+/wFdMFp6wbiqgB/iA="; 38 }; 39 40 - nativeBuildInputs = [ pythonRelaxDepsHook ]; 41 42 - pythonRelaxDeps = [ "protobuf" ]; 43 44 build-system = [ 45 poetry-core
··· 27 28 buildPythonPackage rec { 29 pname = "diffenator2"; 30 + version = "0.4.4"; 31 pyproject = true; 32 33 src = fetchFromGitHub { 34 owner = "googlefonts"; 35 repo = "diffenator2"; 36 rev = "refs/tags/v${version}"; 37 + hash = "sha256-FVdQW2iupAxHFmx6sC88yO2Vx3VvBhPJl55gA0fmvgo="; 38 }; 39 40 + env.PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION = "python"; 41 42 + pythonRelaxDeps = [ 43 + "protobuf" 44 + "python-bidi" 45 + ]; 46 47 build-system = [ 48 poetry-core
+5 -1
pkgs/development/python-modules/fontbakery/default.nix
··· 57 hash = "sha256-Cl0jRQqF83IIldkp1VuVSS4ZeVsQH1NNpyEkpMJqhA8="; 58 }; 59 60 pythonRelaxDeps = [ 61 "collidoscope" 62 "protobuf" ··· 127 ''; 128 129 disabledTests = [ 130 - # These require network access: 131 "test_check_description_broken_links" 132 "test_check_description_family_update" 133 "test_check_metadata_designer_profiles" ··· 138 "test_check_cjk_vertical_metrics" 139 "test_check_cjk_vertical_metrics_regressions" 140 "test_check_fontbakery_version_live_apis" 141 ]; 142 143 postInstall = ''
··· 57 hash = "sha256-Cl0jRQqF83IIldkp1VuVSS4ZeVsQH1NNpyEkpMJqhA8="; 58 }; 59 60 + env.PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION = "python"; 61 + 62 pythonRelaxDeps = [ 63 "collidoscope" 64 "protobuf" ··· 129 ''; 130 131 disabledTests = [ 132 + # These require network access 133 "test_check_description_broken_links" 134 "test_check_description_family_update" 135 "test_check_metadata_designer_profiles" ··· 140 "test_check_cjk_vertical_metrics" 141 "test_check_cjk_vertical_metrics_regressions" 142 "test_check_fontbakery_version_live_apis" 143 + # AssertionError 144 + "test_check_shape_languages" 145 ]; 146 147 postInstall = ''
+18 -5
pkgs/development/python-modules/gflanguages/default.nix
··· 5 protobuf, 6 pytestCheckHook, 7 pythonOlder, 8 setuptools, 9 setuptools-scm, 10 uharfbuzz, ··· 13 14 buildPythonPackage rec { 15 pname = "gflanguages"; 16 - version = "0.6.2"; 17 18 disabled = pythonOlder "3.7"; 19 20 src = fetchPypi { 21 inherit pname version; 22 - hash = "sha256-v93mXDwHT/8Tau78ApLUR+dQCpL9jmRQp0BT5y/sfq4="; 23 }; 24 25 - pyproject = true; 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 build-system = [ 34 setuptools 35 setuptools-scm 36 ]; 37 38 - dependencies = [ protobuf ]; 39 40 nativeCheckInputs = [ 41 pytestCheckHook 42 uharfbuzz 43 youseedee 44 ]; 45 46 meta = with lib; {
··· 5 protobuf, 6 pytestCheckHook, 7 pythonOlder, 8 + regex, 9 setuptools, 10 setuptools-scm, 11 uharfbuzz, ··· 14 15 buildPythonPackage rec { 16 pname = "gflanguages"; 17 + version = "0.6.5"; 18 + pyproject = true; 19 20 disabled = pythonOlder "3.7"; 21 22 src = fetchPypi { 23 inherit pname version; 24 + hash = "sha256-wMhRVWdjKiEfzswnAWqKfzHrpJj0U4q8tzDBGshNryo="; 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 uharfbuzz 48 youseedee 49 + ]; 50 + 51 + pythonImportsCheck = [ "gflanguages" ]; 52 + 53 + disabledTests = [ 54 + # AssertionError 55 + "test_exemplars_are_in_script" 56 + "test_sample_texts_are_in_script" 57 ]; 58 59 meta = with lib; {
+2
pkgs/development/python-modules/gftools/default.nix
··· 114 --replace-fail "'gftools" "'${placeholder "out"}t/bin/gftools" 115 ''; 116 117 pythonRelaxDeps = [ 118 "protobuf" 119 "pygit2"
··· 114 --replace-fail "'gftools" "'${placeholder "out"}t/bin/gftools" 115 ''; 116 117 + env.PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION = "python"; 118 + 119 pythonRelaxDeps = [ 120 "protobuf" 121 "pygit2"
+11 -3
pkgs/development/python-modules/glyphsets/default.nix
··· 1 { 2 lib, 3 buildPythonPackage, 4 - fetchPypi, 5 defcon, 6 fonttools, 7 gflanguages, 8 glyphslib, 9 pytestCheckHook, 10 pyyaml, 11 requests, 12 setuptools, 13 - setuptools-scm, 14 unicodedata2, 15 }: 16 ··· 18 pname = "glyphsets"; 19 version = "1.0.0"; 20 pyproject = true; 21 22 src = fetchPypi { 23 inherit pname version; 24 hash = "sha256-fa+W1IGIZcn1P1xNKm1Yb/TOuf4QdDVnIvlDkOLOcLY="; 25 }; 26 27 postPatch = '' 28 substituteInPlace setup.py \ 29 --replace-fail "setuptools_scm>=8.0.4,<8.1" "setuptools_scm" ··· 53 disabledTests = [ 54 # This "test" just tries to connect to PyPI and look for newer releases. Not needed. 55 "test_dependencies" 56 ]; 57 58 meta = with lib; { 59 description = "Google Fonts glyph set metadata"; 60 - mainProgram = "glyphsets"; 61 homepage = "https://github.com/googlefonts/glyphsets"; 62 license = licenses.asl20; 63 maintainers = with maintainers; [ danc86 ]; 64 }; 65 }
··· 1 { 2 lib, 3 buildPythonPackage, 4 defcon, 5 + fetchPypi, 6 fonttools, 7 gflanguages, 8 glyphslib, 9 pytestCheckHook, 10 + pythonOlder, 11 pyyaml, 12 requests, 13 + setuptools-scm, 14 setuptools, 15 unicodedata2, 16 }: 17 ··· 19 pname = "glyphsets"; 20 version = "1.0.0"; 21 pyproject = true; 22 + 23 + disabled = pythonOlder "3.8"; 24 25 src = fetchPypi { 26 inherit pname version; 27 hash = "sha256-fa+W1IGIZcn1P1xNKm1Yb/TOuf4QdDVnIvlDkOLOcLY="; 28 }; 29 30 + env.PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION = "python"; 31 + 32 postPatch = '' 33 substituteInPlace setup.py \ 34 --replace-fail "setuptools_scm>=8.0.4,<8.1" "setuptools_scm" ··· 58 disabledTests = [ 59 # This "test" just tries to connect to PyPI and look for newer releases. Not needed. 60 "test_dependencies" 61 + # AssertionError 62 + "test_definitions" 63 ]; 64 65 meta = with lib; { 66 description = "Google Fonts glyph set metadata"; 67 homepage = "https://github.com/googlefonts/glyphsets"; 68 + changelog = "https://github.com/googlefonts/glyphsets/blob/v${version}/CHANGELOG.md"; 69 license = licenses.asl20; 70 maintainers = with maintainers; [ danc86 ]; 71 + mainProgram = "glyphsets"; 72 }; 73 }
+22 -11
pkgs/development/python-modules/shaperglot/default.nix
··· 6 num2words, 7 protobuf, 8 pytestCheckHook, 9 pyyaml, 10 setuptools, 11 - setuptools-scm, 12 strictyaml, 13 termcolor, 14 ufo2ft, ··· 18 19 buildPythonPackage rec { 20 pname = "shaperglot"; 21 - version = "0.5.0"; 22 23 - # PyPI source tarballs omit tests, fetch from Github instead 24 src = fetchFromGitHub { 25 owner = "googlefonts"; 26 repo = "shaperglot"; 27 rev = "refs/tags/v${version}"; 28 - hash = "sha256-jmYB1tsMMpFs0X/FW3z9el2nFr8De2jR1dO658w7U4Q="; 29 }; 30 31 - pyproject = true; 32 33 dependencies = [ 34 gflanguages ··· 41 vharfbuzz 42 youseedee 43 ]; 44 - build-system = [ 45 - setuptools 46 - setuptools-scm 47 - ]; 48 49 - doCheck = true; 50 nativeCheckInputs = [ pytestCheckHook ]; 51 52 meta = with lib; { 53 description = "Tool to test OpenType fonts for language support"; 54 - mainProgram = "shaperglot"; 55 homepage = "https://github.com/googlefonts/shaperglot"; 56 license = licenses.asl20; 57 maintainers = with maintainers; [ danc86 ]; 58 }; 59 }
··· 6 num2words, 7 protobuf, 8 pytestCheckHook, 9 + pythonOlder, 10 pyyaml, 11 + setuptools-scm, 12 setuptools, 13 strictyaml, 14 termcolor, 15 ufo2ft, ··· 19 20 buildPythonPackage rec { 21 pname = "shaperglot"; 22 + version = "0.6.4"; 23 + pyproject = true; 24 25 + disabled = pythonOlder "3.7"; 26 + 27 src = fetchFromGitHub { 28 owner = "googlefonts"; 29 repo = "shaperglot"; 30 rev = "refs/tags/v${version}"; 31 + hash = "sha256-O6z7TJpC54QkqX5/G1HKSvaDYty7B9BnCQ4FpsLsEMs="; 32 }; 33 34 + env.PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION = "python"; 35 + 36 + postPatch = '' 37 + substituteInPlace pyproject.toml \ 38 + --replace-fail "setuptools>=75.0.0" "setuptools" 39 + ''; 40 + 41 + build-system = [ 42 + setuptools 43 + setuptools-scm 44 + ]; 45 46 dependencies = [ 47 gflanguages ··· 54 vharfbuzz 55 youseedee 56 ]; 57 58 nativeCheckInputs = [ pytestCheckHook ]; 59 60 + pythonImportsCheck = [ "shaperglot" ]; 61 + 62 meta = with lib; { 63 description = "Tool to test OpenType fonts for language support"; 64 homepage = "https://github.com/googlefonts/shaperglot"; 65 + changelog = "https://github.com/googlefonts/shaperglot/releases/tag/v${version}"; 66 license = licenses.asl20; 67 maintainers = with maintainers; [ danc86 ]; 68 + mainProgram = "shaperglot"; 69 }; 70 }