lol

Merge pull request #300400 from danc86/fix-fontbakery

fontbakery: fix build failures

authored by

Martin Weinelt and committed by
GitHub
80c0bfb2 e7050d01

+94 -53
+18 -11
pkgs/development/python-modules/fontbakery/default.nix
··· 15 , font-v 16 , freetype-py 17 , gflanguages 18 , git 19 , glyphsets 20 , lxml 21 , installShellFiles 22 , munkres 23 , opentypespec 24 , ots-python ··· 32 , requests 33 , requests-mock 34 , rich 35 , setuptools-scm 36 , shaperglot 37 , stringbrewer ··· 45 buildPythonPackage rec { 46 pname = "fontbakery"; 47 version = "0.11.2"; 48 - format = "setuptools"; 49 50 src = fetchPypi { 51 inherit pname version; 52 hash = "sha256-61EXlf+d5kJeUF41OEnGNLaOcSvFWUDFgarVvHQZYmw="; 53 }; 54 55 - patches = [ 56 - # Mock HTTP requests in tests (note we still have to skip some below) 57 - # https://github.com/googlefonts/fontbakery/pull/4124 58 - (fetchpatch { 59 - url = "https://github.com/fonttools/fontbakery/pull/4124.patch"; 60 - hash = "sha256-NXuC2+TtxpHYMdd0t+cF0FJ3lrh4exP5yxspEasKKd0="; 61 - }) 62 - ]; 63 64 - propagatedBuildInputs = [ 65 axisregistry 66 babelfont 67 beautifulsoup4 ··· 74 font-v 75 freetype-py 76 gflanguages 77 glyphsets 78 lxml 79 munkres 80 ots-python 81 opentypespec ··· 93 vharfbuzz 94 ufo2ft 95 ]; 96 nativeBuildInputs = [ 97 installShellFiles 98 pythonRelaxDepsHook 99 - setuptools-scm 100 ]; 101 102 pythonRelaxDeps = [ ··· 125 ''; 126 disabledTests = [ 127 # These require network access: 128 "test_check_vertical_metrics_regressions" 129 "test_check_cjk_vertical_metrics_regressions" 130 "test_check_fontbakery_version_live_apis" 131 ];
··· 15 , font-v 16 , freetype-py 17 , gflanguages 18 + , gfsubsets 19 , git 20 , glyphsets 21 , lxml 22 , installShellFiles 23 + , jinja2 24 , munkres 25 , opentypespec 26 , ots-python ··· 34 , requests 35 , requests-mock 36 , rich 37 + , setuptools 38 , setuptools-scm 39 , shaperglot 40 , stringbrewer ··· 48 buildPythonPackage rec { 49 pname = "fontbakery"; 50 version = "0.11.2"; 51 52 src = fetchPypi { 53 inherit pname version; 54 hash = "sha256-61EXlf+d5kJeUF41OEnGNLaOcSvFWUDFgarVvHQZYmw="; 55 }; 56 57 + pyproject = true; 58 59 + dependencies = [ 60 axisregistry 61 babelfont 62 beautifulsoup4 ··· 69 font-v 70 freetype-py 71 gflanguages 72 + gfsubsets 73 glyphsets 74 lxml 75 + jinja2 76 munkres 77 ots-python 78 opentypespec ··· 90 vharfbuzz 91 ufo2ft 92 ]; 93 + build-system = [ 94 + setuptools 95 + setuptools-scm 96 + ]; 97 nativeBuildInputs = [ 98 installShellFiles 99 pythonRelaxDepsHook 100 ]; 101 102 pythonRelaxDeps = [ ··· 125 ''; 126 disabledTests = [ 127 # These require network access: 128 + "test_check_description_broken_links" 129 + "test_check_description_family_update" 130 + "test_check_metadata_designer_profiles" 131 + "test_check_metadata_has_tags" 132 + "test_check_metadata_includes_production_subsets" 133 + "test_check_vertical_metrics" 134 "test_check_vertical_metrics_regressions" 135 + "test_check_cjk_vertical_metrics" 136 "test_check_cjk_vertical_metrics_regressions" 137 "test_check_fontbakery_version_live_apis" 138 ];
+8 -5
pkgs/development/python-modules/gflanguages/default.nix
··· 5 , pytestCheckHook 6 , pythonOlder 7 , pythonRelaxDepsHook 8 , setuptools-scm 9 , uharfbuzz 10 , youseedee ··· 12 13 buildPythonPackage rec { 14 pname = "gflanguages"; 15 - version = "5.0.4"; 16 - format = "setuptools"; 17 18 disabled = pythonOlder "3.7"; 19 20 src = fetchPypi { 21 inherit pname version; 22 - hash = "sha256-AGXpg9EhwdhrcbdcHqz2v9TLaWH1F5gr0QhSuEN2GDA="; 23 }; 24 25 # Relax the dependency on protobuf 3. Other packages in the Google Fonts 26 # ecosystem have begun upgrading from protobuf 3 to protobuf 4, 27 # so we need to use protobuf 4 here as well to avoid a conflict ··· 30 "protobuf" 31 ]; 32 33 - nativeBuildInputs = [ 34 setuptools-scm 35 ]; 36 37 - propagatedBuildInputs = [ 38 protobuf 39 ]; 40
··· 5 , pytestCheckHook 6 , pythonOlder 7 , pythonRelaxDepsHook 8 + , setuptools 9 , setuptools-scm 10 , uharfbuzz 11 , youseedee ··· 13 14 buildPythonPackage rec { 15 pname = "gflanguages"; 16 + version = "0.5.17"; 17 18 disabled = pythonOlder "3.7"; 19 20 src = fetchPypi { 21 inherit pname version; 22 + hash = "sha256-dScgRQ6usjSqV0FqDyP+KGvHL06wlTFVcO+MmZ2NMAs="; 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 ··· 32 "protobuf" 33 ]; 34 35 + build-system = [ 36 + setuptools 37 setuptools-scm 38 ]; 39 40 + dependencies = [ 41 protobuf 42 ]; 43
+47
pkgs/development/python-modules/gfsubsets/default.nix
···
··· 1 + { lib 2 + , buildPythonPackage 3 + , fetchPypi 4 + , fonttools 5 + , importlib-resources 6 + , setuptools 7 + , setuptools-scm 8 + , youseedee 9 + }: 10 + 11 + buildPythonPackage rec { 12 + pname = "gfsubsets"; 13 + version = "2024.2.5"; 14 + gitTag = "v2024.02.05"; 15 + 16 + src = fetchPypi { 17 + inherit pname version; 18 + hash = "sha256-g9QxLa3B1MMTs+jmj4CyJySZRU0zoFNYdbOZwHjKPaQ="; 19 + }; 20 + 21 + pyproject = true; 22 + 23 + build-system = [ 24 + setuptools 25 + setuptools-scm 26 + ]; 27 + 28 + dependencies = [ 29 + fonttools 30 + importlib-resources 31 + youseedee 32 + ]; 33 + 34 + # Package has no unit tests. 35 + doCheck = false; 36 + pythonImportsCheck = [ 37 + "gfsubsets" 38 + ]; 39 + 40 + meta = with lib; { 41 + description = "Codepoint definitions for the Google Fonts subsetter"; 42 + homepage = "https://github.com/googlefonts/nam-files"; 43 + changelog = "https://github.com/googlefonts/nam-files/releases/tag/${gitTag}"; 44 + license = licenses.asl20; 45 + maintainers = with maintainers; [ danc86 ]; 46 + }; 47 + }
-22
pkgs/development/python-modules/glyphsets/0001-relax-setuptools-scm-dep.patch
··· 1 - From de2e02a41b11a708d58dfd1e24d335b8882dd7bd Mon Sep 17 00:00:00 2001 2 - From: Dan Callaghan <djc@djc.id.au> 3 - Date: Sun, 23 Apr 2023 12:15:47 +1000 4 - Subject: [PATCH] relax setuptools-scm dep 5 - 6 - 7 - diff --git a/setup.py b/setup.py 8 - index 2c122a7..42f9b61 100644 9 - --- a/setup.py 10 - +++ b/setup.py 11 - @@ -55,7 +55,7 @@ 12 - 'Programming Language :: Python :: 3' 13 - ], 14 - python_requires=">=3.7", 15 - - setup_requires=['setuptools_scm>=4,<6.1'], 16 - + setup_requires=['setuptools_scm'], 17 - install_requires=[ 18 - 'setuptools', 19 - 'FontTools[ufo]', 20 - -- 21 - 2.38.4 22 -
···
+11 -11
pkgs/development/python-modules/glyphsets/default.nix
··· 3 , fetchPypi 4 , defcon 5 , fonttools 6 , glyphslib 7 , pytestCheckHook 8 , setuptools 9 , setuptools-scm 10 , unicodedata2 ··· 13 buildPythonPackage rec { 14 pname = "glyphsets"; 15 version = "0.6.14"; 16 - format = "setuptools"; 17 18 src = fetchPypi { 19 inherit pname version; 20 hash = "sha256-lMRgchadgKyfFLw6ZF1sJAKBAK75zmw77L34MW9p7TI="; 21 }; 22 23 - patches = [ 24 - # Upstream has a needlessly strict version range for setuptools_scm, our 25 - # setuptools-scm is newer. We can't use pythonRelaxDepsHook for this 26 - # because it's in setup_requires which means we'll fail the requirement 27 - # before pythonRelaxDepsHook can run. 28 - ./0001-relax-setuptools-scm-dep.patch 29 - ]; 30 - 31 - propagatedBuildInputs = [ 32 defcon 33 fonttools 34 glyphslib 35 setuptools 36 unicodedata2 37 ]; 38 - nativeBuildInputs = [ 39 setuptools-scm 40 ]; 41 ··· 46 preCheck = '' 47 export PATH="$out/bin:$PATH" 48 ''; 49 50 meta = with lib; { 51 description = "Google Fonts glyph set metadata";
··· 3 , fetchPypi 4 , defcon 5 , fonttools 6 + , gflanguages 7 , glyphslib 8 , pytestCheckHook 9 + , requests 10 , setuptools 11 , setuptools-scm 12 , unicodedata2 ··· 15 buildPythonPackage rec { 16 pname = "glyphsets"; 17 version = "0.6.14"; 18 + pyproject = true; 19 20 src = fetchPypi { 21 inherit pname version; 22 hash = "sha256-lMRgchadgKyfFLw6ZF1sJAKBAK75zmw77L34MW9p7TI="; 23 }; 24 25 + dependencies = [ 26 defcon 27 fonttools 28 + gflanguages 29 glyphslib 30 + requests 31 setuptools 32 unicodedata2 33 ]; 34 + build-system = [ 35 setuptools-scm 36 ]; 37 ··· 42 preCheck = '' 43 export PATH="$out/bin:$PATH" 44 ''; 45 + disabledTests = [ 46 + # This "test" just tries to connect to PyPI and look for newer releases. Not needed. 47 + "test_dependencies" 48 + ]; 49 50 meta = with lib; { 51 description = "Google Fonts glyph set metadata";
+8 -4
pkgs/development/python-modules/shaperglot/default.nix
··· 3 , fetchFromGitHub 4 , gflanguages 5 , num2words 6 - , poetry-core 7 , protobuf 8 , pytestCheckHook 9 , strictyaml 10 , termcolor 11 , ufo2ft ··· 27 28 pyproject = true; 29 30 - propagatedBuildInputs = [ 31 gflanguages 32 num2words 33 protobuf 34 strictyaml 35 termcolor 36 ufo2ft 37 vharfbuzz 38 youseedee 39 ]; 40 - nativeBuildInputs = [ 41 - poetry-core 42 ]; 43 44 doCheck = true;
··· 3 , fetchFromGitHub 4 , gflanguages 5 , num2words 6 , protobuf 7 , pytestCheckHook 8 + , pyyaml 9 + , setuptools 10 + , setuptools-scm 11 , strictyaml 12 , termcolor 13 , ufo2ft ··· 29 30 pyproject = true; 31 32 + dependencies = [ 33 gflanguages 34 num2words 35 protobuf 36 + pyyaml 37 strictyaml 38 termcolor 39 ufo2ft 40 vharfbuzz 41 youseedee 42 ]; 43 + build-system = [ 44 + setuptools 45 + setuptools-scm 46 ]; 47 48 doCheck = true;
+2
pkgs/top-level/python-packages.nix
··· 4725 4726 gflanguages = callPackage ../development/python-modules/gflanguages { }; 4727 4728 ghapi = callPackage ../development/python-modules/ghapi { }; 4729 4730 ghdiff = callPackage ../development/python-modules/ghdiff { };
··· 4725 4726 gflanguages = callPackage ../development/python-modules/gflanguages { }; 4727 4728 + gfsubsets = callPackage ../development/python-modules/gfsubsets { }; 4729 + 4730 ghapi = callPackage ../development/python-modules/ghapi { }; 4731 4732 ghdiff = callPackage ../development/python-modules/ghdiff { };