mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-02 18:23:44 +00:00
Merge pull request #300400 from danc86/fix-fontbakery
fontbakery: fix build failures
This commit is contained in:
commit
80c0bfb2ec
@ -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"
|
||||
];
|
||||
|
@ -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
pkgs/development/python-modules/gfsubsets/default.nix
Normal file
47
pkgs/development/python-modules/gfsubsets/default.nix
Normal file
@ -0,0 +1,47 @@
|
||||
{ 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 ];
|
||||
};
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
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
|
||||
|
@ -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";
|
||||
|
@ -3,9 +3,11 @@
|
||||
, fetchFromGitHub
|
||||
, gflanguages
|
||||
, num2words
|
||||
, poetry-core
|
||||
, protobuf
|
||||
, pytestCheckHook
|
||||
, pyyaml
|
||||
, setuptools
|
||||
, setuptools-scm
|
||||
, strictyaml
|
||||
, termcolor
|
||||
, ufo2ft
|
||||
@ -27,18 +29,20 @@ buildPythonPackage rec {
|
||||
|
||||
pyproject = true;
|
||||
|
||||
propagatedBuildInputs = [
|
||||
dependencies = [
|
||||
gflanguages
|
||||
num2words
|
||||
protobuf
|
||||
pyyaml
|
||||
strictyaml
|
||||
termcolor
|
||||
ufo2ft
|
||||
vharfbuzz
|
||||
youseedee
|
||||
];
|
||||
nativeBuildInputs = [
|
||||
poetry-core
|
||||
build-system = [
|
||||
setuptools
|
||||
setuptools-scm
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
@ -4725,6 +4725,8 @@ self: super: with self; {
|
||||
|
||||
gflanguages = callPackage ../development/python-modules/gflanguages { };
|
||||
|
||||
gfsubsets = callPackage ../development/python-modules/gfsubsets { };
|
||||
|
||||
ghapi = callPackage ../development/python-modules/ghapi { };
|
||||
|
||||
ghdiff = callPackage ../development/python-modules/ghdiff { };
|
||||
|
Loading…
Reference in New Issue
Block a user