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 15 , font-v 16 16 , freetype-py 17 17 , gflanguages 18 + , gfsubsets 18 19 , git 19 20 , glyphsets 20 21 , lxml 21 22 , installShellFiles 23 + , jinja2 22 24 , munkres 23 25 , opentypespec 24 26 , ots-python ··· 32 34 , requests 33 35 , requests-mock 34 36 , rich 37 + , setuptools 35 38 , setuptools-scm 36 39 , shaperglot 37 40 , stringbrewer ··· 45 48 buildPythonPackage rec { 46 49 pname = "fontbakery"; 47 50 version = "0.11.2"; 48 - format = "setuptools"; 49 51 50 52 src = fetchPypi { 51 53 inherit pname version; 52 54 hash = "sha256-61EXlf+d5kJeUF41OEnGNLaOcSvFWUDFgarVvHQZYmw="; 53 55 }; 54 56 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 - ]; 57 + pyproject = true; 63 58 64 - propagatedBuildInputs = [ 59 + dependencies = [ 65 60 axisregistry 66 61 babelfont 67 62 beautifulsoup4 ··· 74 69 font-v 75 70 freetype-py 76 71 gflanguages 72 + gfsubsets 77 73 glyphsets 78 74 lxml 75 + jinja2 79 76 munkres 80 77 ots-python 81 78 opentypespec ··· 93 90 vharfbuzz 94 91 ufo2ft 95 92 ]; 93 + build-system = [ 94 + setuptools 95 + setuptools-scm 96 + ]; 96 97 nativeBuildInputs = [ 97 98 installShellFiles 98 99 pythonRelaxDepsHook 99 - setuptools-scm 100 100 ]; 101 101 102 102 pythonRelaxDeps = [ ··· 125 125 ''; 126 126 disabledTests = [ 127 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" 128 134 "test_check_vertical_metrics_regressions" 135 + "test_check_cjk_vertical_metrics" 129 136 "test_check_cjk_vertical_metrics_regressions" 130 137 "test_check_fontbakery_version_live_apis" 131 138 ];
+8 -5
pkgs/development/python-modules/gflanguages/default.nix
··· 5 5 , pytestCheckHook 6 6 , pythonOlder 7 7 , pythonRelaxDepsHook 8 + , setuptools 8 9 , setuptools-scm 9 10 , uharfbuzz 10 11 , youseedee ··· 12 13 13 14 buildPythonPackage rec { 14 15 pname = "gflanguages"; 15 - version = "5.0.4"; 16 - format = "setuptools"; 16 + version = "0.5.17"; 17 17 18 18 disabled = pythonOlder "3.7"; 19 19 20 20 src = fetchPypi { 21 21 inherit pname version; 22 - hash = "sha256-AGXpg9EhwdhrcbdcHqz2v9TLaWH1F5gr0QhSuEN2GDA="; 22 + hash = "sha256-dScgRQ6usjSqV0FqDyP+KGvHL06wlTFVcO+MmZ2NMAs="; 23 23 }; 24 24 25 + pyproject = true; 26 + 25 27 # Relax the dependency on protobuf 3. Other packages in the Google Fonts 26 28 # ecosystem have begun upgrading from protobuf 3 to protobuf 4, 27 29 # so we need to use protobuf 4 here as well to avoid a conflict ··· 30 32 "protobuf" 31 33 ]; 32 34 33 - nativeBuildInputs = [ 35 + build-system = [ 36 + setuptools 34 37 setuptools-scm 35 38 ]; 36 39 37 - propagatedBuildInputs = [ 40 + dependencies = [ 38 41 protobuf 39 42 ]; 40 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 3 , fetchPypi 4 4 , defcon 5 5 , fonttools 6 + , gflanguages 6 7 , glyphslib 7 8 , pytestCheckHook 9 + , requests 8 10 , setuptools 9 11 , setuptools-scm 10 12 , unicodedata2 ··· 13 15 buildPythonPackage rec { 14 16 pname = "glyphsets"; 15 17 version = "0.6.14"; 16 - format = "setuptools"; 18 + pyproject = true; 17 19 18 20 src = fetchPypi { 19 21 inherit pname version; 20 22 hash = "sha256-lMRgchadgKyfFLw6ZF1sJAKBAK75zmw77L34MW9p7TI="; 21 23 }; 22 24 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 = [ 25 + dependencies = [ 32 26 defcon 33 27 fonttools 28 + gflanguages 34 29 glyphslib 30 + requests 35 31 setuptools 36 32 unicodedata2 37 33 ]; 38 - nativeBuildInputs = [ 34 + build-system = [ 39 35 setuptools-scm 40 36 ]; 41 37 ··· 46 42 preCheck = '' 47 43 export PATH="$out/bin:$PATH" 48 44 ''; 45 + disabledTests = [ 46 + # This "test" just tries to connect to PyPI and look for newer releases. Not needed. 47 + "test_dependencies" 48 + ]; 49 49 50 50 meta = with lib; { 51 51 description = "Google Fonts glyph set metadata";
+8 -4
pkgs/development/python-modules/shaperglot/default.nix
··· 3 3 , fetchFromGitHub 4 4 , gflanguages 5 5 , num2words 6 - , poetry-core 7 6 , protobuf 8 7 , pytestCheckHook 8 + , pyyaml 9 + , setuptools 10 + , setuptools-scm 9 11 , strictyaml 10 12 , termcolor 11 13 , ufo2ft ··· 27 29 28 30 pyproject = true; 29 31 30 - propagatedBuildInputs = [ 32 + dependencies = [ 31 33 gflanguages 32 34 num2words 33 35 protobuf 36 + pyyaml 34 37 strictyaml 35 38 termcolor 36 39 ufo2ft 37 40 vharfbuzz 38 41 youseedee 39 42 ]; 40 - nativeBuildInputs = [ 41 - poetry-core 43 + build-system = [ 44 + setuptools 45 + setuptools-scm 42 46 ]; 43 47 44 48 doCheck = true;
+2
pkgs/top-level/python-packages.nix
··· 4725 4725 4726 4726 gflanguages = callPackage ../development/python-modules/gflanguages { }; 4727 4727 4728 + gfsubsets = callPackage ../development/python-modules/gfsubsets { }; 4729 + 4728 4730 ghapi = callPackage ../development/python-modules/ghapi { }; 4729 4731 4730 4732 ghdiff = callPackage ../development/python-modules/ghdiff { };