mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 04:19:00 +02: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
|
, font-v
|
||||||
, freetype-py
|
, freetype-py
|
||||||
, gflanguages
|
, gflanguages
|
||||||
|
, gfsubsets
|
||||||
, git
|
, git
|
||||||
, glyphsets
|
, glyphsets
|
||||||
, lxml
|
, lxml
|
||||||
, installShellFiles
|
, installShellFiles
|
||||||
|
, jinja2
|
||||||
, munkres
|
, munkres
|
||||||
, opentypespec
|
, opentypespec
|
||||||
, ots-python
|
, ots-python
|
||||||
|
@ -32,6 +34,7 @@
|
||||||
, requests
|
, requests
|
||||||
, requests-mock
|
, requests-mock
|
||||||
, rich
|
, rich
|
||||||
|
, setuptools
|
||||||
, setuptools-scm
|
, setuptools-scm
|
||||||
, shaperglot
|
, shaperglot
|
||||||
, stringbrewer
|
, stringbrewer
|
||||||
|
@ -45,23 +48,15 @@
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "fontbakery";
|
pname = "fontbakery";
|
||||||
version = "0.11.2";
|
version = "0.11.2";
|
||||||
format = "setuptools";
|
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
hash = "sha256-61EXlf+d5kJeUF41OEnGNLaOcSvFWUDFgarVvHQZYmw=";
|
hash = "sha256-61EXlf+d5kJeUF41OEnGNLaOcSvFWUDFgarVvHQZYmw=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
pyproject = true;
|
||||||
# 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=";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
dependencies = [
|
||||||
axisregistry
|
axisregistry
|
||||||
babelfont
|
babelfont
|
||||||
beautifulsoup4
|
beautifulsoup4
|
||||||
|
@ -74,8 +69,10 @@ buildPythonPackage rec {
|
||||||
font-v
|
font-v
|
||||||
freetype-py
|
freetype-py
|
||||||
gflanguages
|
gflanguages
|
||||||
|
gfsubsets
|
||||||
glyphsets
|
glyphsets
|
||||||
lxml
|
lxml
|
||||||
|
jinja2
|
||||||
munkres
|
munkres
|
||||||
ots-python
|
ots-python
|
||||||
opentypespec
|
opentypespec
|
||||||
|
@ -93,10 +90,13 @@ buildPythonPackage rec {
|
||||||
vharfbuzz
|
vharfbuzz
|
||||||
ufo2ft
|
ufo2ft
|
||||||
];
|
];
|
||||||
|
build-system = [
|
||||||
|
setuptools
|
||||||
|
setuptools-scm
|
||||||
|
];
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
installShellFiles
|
installShellFiles
|
||||||
pythonRelaxDepsHook
|
pythonRelaxDepsHook
|
||||||
setuptools-scm
|
|
||||||
];
|
];
|
||||||
|
|
||||||
pythonRelaxDeps = [
|
pythonRelaxDeps = [
|
||||||
|
@ -125,7 +125,14 @@ buildPythonPackage rec {
|
||||||
'';
|
'';
|
||||||
disabledTests = [
|
disabledTests = [
|
||||||
# These require network access:
|
# 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_vertical_metrics_regressions"
|
||||||
|
"test_check_cjk_vertical_metrics"
|
||||||
"test_check_cjk_vertical_metrics_regressions"
|
"test_check_cjk_vertical_metrics_regressions"
|
||||||
"test_check_fontbakery_version_live_apis"
|
"test_check_fontbakery_version_live_apis"
|
||||||
];
|
];
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
, pytestCheckHook
|
, pytestCheckHook
|
||||||
, pythonOlder
|
, pythonOlder
|
||||||
, pythonRelaxDepsHook
|
, pythonRelaxDepsHook
|
||||||
|
, setuptools
|
||||||
, setuptools-scm
|
, setuptools-scm
|
||||||
, uharfbuzz
|
, uharfbuzz
|
||||||
, youseedee
|
, youseedee
|
||||||
|
@ -12,16 +13,17 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "gflanguages";
|
pname = "gflanguages";
|
||||||
version = "5.0.4";
|
version = "0.5.17";
|
||||||
format = "setuptools";
|
|
||||||
|
|
||||||
disabled = pythonOlder "3.7";
|
disabled = pythonOlder "3.7";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
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
|
# Relax the dependency on protobuf 3. Other packages in the Google Fonts
|
||||||
# ecosystem have begun upgrading from protobuf 3 to protobuf 4,
|
# ecosystem have begun upgrading from protobuf 3 to protobuf 4,
|
||||||
# so we need to use protobuf 4 here as well to avoid a conflict
|
# so we need to use protobuf 4 here as well to avoid a conflict
|
||||||
|
@ -30,11 +32,12 @@ buildPythonPackage rec {
|
||||||
"protobuf"
|
"protobuf"
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
build-system = [
|
||||||
|
setuptools
|
||||||
setuptools-scm
|
setuptools-scm
|
||||||
];
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
dependencies = [
|
||||||
protobuf
|
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
|
, fetchPypi
|
||||||
, defcon
|
, defcon
|
||||||
, fonttools
|
, fonttools
|
||||||
|
, gflanguages
|
||||||
, glyphslib
|
, glyphslib
|
||||||
, pytestCheckHook
|
, pytestCheckHook
|
||||||
|
, requests
|
||||||
, setuptools
|
, setuptools
|
||||||
, setuptools-scm
|
, setuptools-scm
|
||||||
, unicodedata2
|
, unicodedata2
|
||||||
|
@ -13,29 +15,23 @@
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "glyphsets";
|
pname = "glyphsets";
|
||||||
version = "0.6.14";
|
version = "0.6.14";
|
||||||
format = "setuptools";
|
pyproject = true;
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
hash = "sha256-lMRgchadgKyfFLw6ZF1sJAKBAK75zmw77L34MW9p7TI=";
|
hash = "sha256-lMRgchadgKyfFLw6ZF1sJAKBAK75zmw77L34MW9p7TI=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
dependencies = [
|
||||||
# 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 = [
|
|
||||||
defcon
|
defcon
|
||||||
fonttools
|
fonttools
|
||||||
|
gflanguages
|
||||||
glyphslib
|
glyphslib
|
||||||
|
requests
|
||||||
setuptools
|
setuptools
|
||||||
unicodedata2
|
unicodedata2
|
||||||
];
|
];
|
||||||
nativeBuildInputs = [
|
build-system = [
|
||||||
setuptools-scm
|
setuptools-scm
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -46,6 +42,10 @@ buildPythonPackage rec {
|
||||||
preCheck = ''
|
preCheck = ''
|
||||||
export PATH="$out/bin:$PATH"
|
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; {
|
meta = with lib; {
|
||||||
description = "Google Fonts glyph set metadata";
|
description = "Google Fonts glyph set metadata";
|
||||||
|
|
|
@ -3,9 +3,11 @@
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, gflanguages
|
, gflanguages
|
||||||
, num2words
|
, num2words
|
||||||
, poetry-core
|
|
||||||
, protobuf
|
, protobuf
|
||||||
, pytestCheckHook
|
, pytestCheckHook
|
||||||
|
, pyyaml
|
||||||
|
, setuptools
|
||||||
|
, setuptools-scm
|
||||||
, strictyaml
|
, strictyaml
|
||||||
, termcolor
|
, termcolor
|
||||||
, ufo2ft
|
, ufo2ft
|
||||||
|
@ -27,18 +29,20 @@ buildPythonPackage rec {
|
||||||
|
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
dependencies = [
|
||||||
gflanguages
|
gflanguages
|
||||||
num2words
|
num2words
|
||||||
protobuf
|
protobuf
|
||||||
|
pyyaml
|
||||||
strictyaml
|
strictyaml
|
||||||
termcolor
|
termcolor
|
||||||
ufo2ft
|
ufo2ft
|
||||||
vharfbuzz
|
vharfbuzz
|
||||||
youseedee
|
youseedee
|
||||||
];
|
];
|
||||||
nativeBuildInputs = [
|
build-system = [
|
||||||
poetry-core
|
setuptools
|
||||||
|
setuptools-scm
|
||||||
];
|
];
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
|
@ -4725,6 +4725,8 @@ self: super: with self; {
|
||||||
|
|
||||||
gflanguages = callPackage ../development/python-modules/gflanguages { };
|
gflanguages = callPackage ../development/python-modules/gflanguages { };
|
||||||
|
|
||||||
|
gfsubsets = callPackage ../development/python-modules/gfsubsets { };
|
||||||
|
|
||||||
ghapi = callPackage ../development/python-modules/ghapi { };
|
ghapi = callPackage ../development/python-modules/ghapi { };
|
||||||
|
|
||||||
ghdiff = callPackage ../development/python-modules/ghdiff { };
|
ghdiff = callPackage ../development/python-modules/ghdiff { };
|
||||||
|
|
Loading…
Reference in a new issue