Unverified Commit 80c0bfb2 authored by Martin Weinelt's avatar Martin Weinelt Committed by GitHub
Browse files

Merge pull request #300400 from danc86/fix-fontbakery

fontbakery: fix build failures
parents e7050d01 abae9329
Loading
Loading
Loading
Loading
+18 −11
Original line number Diff line number Diff line
@@ -15,10 +15,12 @@
, font-v
, freetype-py
, gflanguages
, gfsubsets
, git
, glyphsets
, lxml
, installShellFiles
, jinja2
, munkres
, opentypespec
, ots-python
@@ -32,6 +34,7 @@
, requests
, requests-mock
, rich
, setuptools
, setuptools-scm
, shaperglot
, stringbrewer
@@ -45,23 +48,15 @@
buildPythonPackage rec {
  pname = "fontbakery";
  version = "0.11.2";
  format = "setuptools";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-61EXlf+d5kJeUF41OEnGNLaOcSvFWUDFgarVvHQZYmw=";
  };

  patches = [
    # Mock HTTP requests in tests (note we still have to skip some below)
    # https://github.com/googlefonts/fontbakery/pull/4124
    (fetchpatch {
      url = "https://github.com/fonttools/fontbakery/pull/4124.patch";
      hash = "sha256-NXuC2+TtxpHYMdd0t+cF0FJ3lrh4exP5yxspEasKKd0=";
    })
  ];
  pyproject = true;

  propagatedBuildInputs = [
  dependencies = [
    axisregistry
    babelfont
    beautifulsoup4
@@ -74,8 +69,10 @@ buildPythonPackage rec {
    font-v
    freetype-py
    gflanguages
    gfsubsets
    glyphsets
    lxml
    jinja2
    munkres
    ots-python
    opentypespec
@@ -93,10 +90,13 @@ buildPythonPackage rec {
    vharfbuzz
    ufo2ft
  ];
  build-system = [
    setuptools
    setuptools-scm
  ];
  nativeBuildInputs = [
    installShellFiles
    pythonRelaxDepsHook
    setuptools-scm
  ];

  pythonRelaxDeps = [
@@ -125,7 +125,14 @@ buildPythonPackage rec {
  '';
  disabledTests = [
    # These require network access:
    "test_check_description_broken_links"
    "test_check_description_family_update"
    "test_check_metadata_designer_profiles"
    "test_check_metadata_has_tags"
    "test_check_metadata_includes_production_subsets"
    "test_check_vertical_metrics"
    "test_check_vertical_metrics_regressions"
    "test_check_cjk_vertical_metrics"
    "test_check_cjk_vertical_metrics_regressions"
    "test_check_fontbakery_version_live_apis"
  ];
+8 −5
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@
, pytestCheckHook
, pythonOlder
, pythonRelaxDepsHook
, setuptools
, setuptools-scm
, uharfbuzz
, youseedee
@@ -12,16 +13,17 @@

buildPythonPackage rec {
  pname = "gflanguages";
  version = "5.0.4";
  format = "setuptools";
  version = "0.5.17";

  disabled = pythonOlder "3.7";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-AGXpg9EhwdhrcbdcHqz2v9TLaWH1F5gr0QhSuEN2GDA=";
    hash = "sha256-dScgRQ6usjSqV0FqDyP+KGvHL06wlTFVcO+MmZ2NMAs=";
  };

  pyproject = true;

  # Relax the dependency on protobuf 3. Other packages in the Google Fonts
  # ecosystem have begun upgrading from protobuf 3 to protobuf 4,
  # so we need to use protobuf 4 here as well to avoid a conflict
@@ -30,11 +32,12 @@ buildPythonPackage rec {
    "protobuf"
  ];

  nativeBuildInputs = [
  build-system = [
    setuptools
    setuptools-scm
  ];

  propagatedBuildInputs = [
  dependencies = [
    protobuf
  ];

+47 −0
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchPypi
, fonttools
, importlib-resources
, setuptools
, setuptools-scm
, youseedee
}:

buildPythonPackage rec {
  pname = "gfsubsets";
  version = "2024.2.5";
  gitTag = "v2024.02.05";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-g9QxLa3B1MMTs+jmj4CyJySZRU0zoFNYdbOZwHjKPaQ=";
  };

  pyproject = true;

  build-system = [
    setuptools
    setuptools-scm
  ];

  dependencies = [
    fonttools
    importlib-resources
    youseedee
  ];

  # Package has no unit tests.
  doCheck = false;
  pythonImportsCheck = [
    "gfsubsets"
  ];

  meta = with lib; {
    description = "Codepoint definitions for the Google Fonts subsetter";
    homepage = "https://github.com/googlefonts/nam-files";
    changelog = "https://github.com/googlefonts/nam-files/releases/tag/${gitTag}";
    license = licenses.asl20;
    maintainers = with maintainers; [ danc86 ];
  };
}
+0 −22
Original line number Diff line number Diff line
From de2e02a41b11a708d58dfd1e24d335b8882dd7bd Mon Sep 17 00:00:00 2001
From: Dan Callaghan <djc@djc.id.au>
Date: Sun, 23 Apr 2023 12:15:47 +1000
Subject: [PATCH] relax setuptools-scm dep


diff --git a/setup.py b/setup.py
index 2c122a7..42f9b61 100644
--- a/setup.py
+++ b/setup.py
@@ -55,7 +55,7 @@
         'Programming Language :: Python :: 3'
     ],
     python_requires=">=3.7",
-    setup_requires=['setuptools_scm>=4,<6.1'],
+    setup_requires=['setuptools_scm'],
     install_requires=[
         'setuptools',
         'FontTools[ufo]',
-- 
2.38.4
+11 −11
Original line number Diff line number Diff line
@@ -3,8 +3,10 @@
, fetchPypi
, defcon
, fonttools
, gflanguages
, glyphslib
, pytestCheckHook
, requests
, setuptools
, setuptools-scm
, unicodedata2
@@ -13,29 +15,23 @@
buildPythonPackage rec {
  pname = "glyphsets";
  version = "0.6.14";
  format = "setuptools";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-lMRgchadgKyfFLw6ZF1sJAKBAK75zmw77L34MW9p7TI=";
  };

  patches = [
    # Upstream has a needlessly strict version range for setuptools_scm, our
    # setuptools-scm is newer. We can't use pythonRelaxDepsHook for this
    # because it's in setup_requires which means we'll fail the requirement
    # before pythonRelaxDepsHook can run.
    ./0001-relax-setuptools-scm-dep.patch
  ];

  propagatedBuildInputs = [
  dependencies = [
    defcon
    fonttools
    gflanguages
    glyphslib
    requests
    setuptools
    unicodedata2
  ];
  nativeBuildInputs = [
  build-system = [
    setuptools-scm
  ];

@@ -46,6 +42,10 @@ buildPythonPackage rec {
  preCheck = ''
    export PATH="$out/bin:$PATH"
  '';
  disabledTests = [
    # This "test" just tries to connect to PyPI and look for newer releases. Not needed.
    "test_dependencies"
  ];

  meta = with lib; {
    description = "Google Fonts glyph set metadata";
Loading