mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-05 19:53:43 +00:00
python312Packages.afdko: refactor (#349610)
This commit is contained in:
commit
6d150cabb3
@ -1,52 +1,47 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
pythonOlder,
|
||||
fonttools,
|
||||
defcon,
|
||||
lxml,
|
||||
fs,
|
||||
unicodedata2,
|
||||
zopfli,
|
||||
brotlipy,
|
||||
fontpens,
|
||||
brotli,
|
||||
fontmath,
|
||||
mutatormath,
|
||||
booleanoperations,
|
||||
ufoprocessor,
|
||||
ufonormalizer,
|
||||
tqdm,
|
||||
setuptools-scm,
|
||||
scikit-build,
|
||||
cmake,
|
||||
ninja,
|
||||
antlr4_9,
|
||||
libxml2,
|
||||
pytestCheckHook,
|
||||
# Enables some expensive tests, useful for verifying an update
|
||||
runAllTests ? false,
|
||||
afdko,
|
||||
antlr4_9,
|
||||
booleanoperations,
|
||||
buildPythonPackage,
|
||||
cmake,
|
||||
defcon,
|
||||
fetchFromGitHub,
|
||||
fontmath,
|
||||
fontpens,
|
||||
fonttools,
|
||||
libxml2,
|
||||
mutatormath,
|
||||
ninja,
|
||||
pytestCheckHook,
|
||||
pythonOlder,
|
||||
runAllTests ? false,
|
||||
scikit-build,
|
||||
setuptools-scm,
|
||||
tqdm,
|
||||
ufonormalizer,
|
||||
ufoprocessor,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "afdko";
|
||||
version = "4.0.1";
|
||||
format = "pyproject";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "adobe-type-tools";
|
||||
repo = pname;
|
||||
repo = "afdko";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-I5GKPkbyQX8QNSZgNB3wPKdWwpx8Xkklesu1M7nhgp8=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools-scm ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
setuptools-scm
|
||||
scikit-build
|
||||
cmake
|
||||
ninja
|
||||
@ -78,23 +73,23 @@ buildPythonPackage rec {
|
||||
# setup.py will always (re-)execute cmake in buildPhase
|
||||
dontConfigure = true;
|
||||
|
||||
propagatedBuildInputs = [
|
||||
booleanoperations
|
||||
fonttools
|
||||
lxml # fonttools[lxml], defcon[lxml] extra
|
||||
fs # fonttools[ufo] extra
|
||||
unicodedata2 # fonttools[unicode] extra
|
||||
brotlipy # fonttools[woff] extra
|
||||
zopfli # fonttools[woff] extra
|
||||
fontpens
|
||||
brotli
|
||||
defcon
|
||||
fontmath
|
||||
mutatormath
|
||||
ufoprocessor
|
||||
ufonormalizer
|
||||
tqdm
|
||||
];
|
||||
dependencies =
|
||||
[
|
||||
booleanoperations
|
||||
defcon
|
||||
fontmath
|
||||
fontpens
|
||||
fonttools
|
||||
mutatormath
|
||||
tqdm
|
||||
ufonormalizer
|
||||
ufoprocessor
|
||||
]
|
||||
++ defcon.optional-dependencies.lxml
|
||||
++ fonttools.optional-dependencies.lxml
|
||||
++ fonttools.optional-dependencies.ufo
|
||||
++ fonttools.optional-dependencies.unicode
|
||||
++ fonttools.optional-dependencies.woff;
|
||||
|
||||
# Use system libxml2
|
||||
FORCE_SYSTEM_LIBXML2 = true;
|
||||
@ -116,7 +111,7 @@ buildPythonPackage rec {
|
||||
"test_waterfallplot"
|
||||
]
|
||||
++ lib.optionals (stdenv.cc.isGNU) [
|
||||
# broke in the gcc 13 → 14 update
|
||||
# broke in the gcc 13 -> 14 update
|
||||
"test_dump"
|
||||
"test_input_formats"
|
||||
"test_other_input_formats"
|
||||
@ -146,10 +141,10 @@ buildPythonPackage rec {
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
changelog = "https://github.com/adobe-type-tools/afdko/blob/${version}/NEWS.md";
|
||||
description = "Adobe Font Development Kit for OpenType";
|
||||
changelog = "https://github.com/adobe-type-tools/afdko/blob/${version}/NEWS.md";
|
||||
homepage = "https://adobe-type-tools.github.io/afdko";
|
||||
license = licenses.asl20;
|
||||
maintainers = [ maintainers.sternenseemann ];
|
||||
maintainers = with maintainers; [ sternenseemann ];
|
||||
};
|
||||
}
|
||||
|
@ -5,8 +5,8 @@
|
||||
fonttools,
|
||||
protobuf,
|
||||
pytestCheckHook,
|
||||
setuptools-scm,
|
||||
pythonOlder,
|
||||
setuptools-scm,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
@ -27,6 +27,8 @@ buildPythonPackage rec {
|
||||
# in the closure of fontbakery. It seems to be compatible enough.
|
||||
pythonRelaxDeps = [ "protobuf" ];
|
||||
|
||||
env.PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION = "python";
|
||||
|
||||
build-system = [ setuptools-scm ];
|
||||
|
||||
dependencies = [
|
||||
|
@ -27,19 +27,22 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "diffenator2";
|
||||
version = "0.4.3";
|
||||
version = "0.4.4";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "googlefonts";
|
||||
repo = "diffenator2";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-zeNcNR14ieY6Inp4kOwIPXd6S+/wFdMFp6wbiqgB/iA=";
|
||||
hash = "sha256-FVdQW2iupAxHFmx6sC88yO2Vx3VvBhPJl55gA0fmvgo=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pythonRelaxDepsHook ];
|
||||
env.PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION = "python";
|
||||
|
||||
pythonRelaxDeps = [ "protobuf" ];
|
||||
pythonRelaxDeps = [
|
||||
"protobuf"
|
||||
"python-bidi"
|
||||
];
|
||||
|
||||
build-system = [
|
||||
poetry-core
|
||||
|
@ -57,6 +57,8 @@ buildPythonPackage rec {
|
||||
hash = "sha256-Cl0jRQqF83IIldkp1VuVSS4ZeVsQH1NNpyEkpMJqhA8=";
|
||||
};
|
||||
|
||||
env.PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION = "python";
|
||||
|
||||
pythonRelaxDeps = [
|
||||
"collidoscope"
|
||||
"protobuf"
|
||||
@ -127,7 +129,7 @@ buildPythonPackage rec {
|
||||
'';
|
||||
|
||||
disabledTests = [
|
||||
# These require network access:
|
||||
# These require network access
|
||||
"test_check_description_broken_links"
|
||||
"test_check_description_family_update"
|
||||
"test_check_metadata_designer_profiles"
|
||||
@ -138,6 +140,8 @@ buildPythonPackage rec {
|
||||
"test_check_cjk_vertical_metrics"
|
||||
"test_check_cjk_vertical_metrics_regressions"
|
||||
"test_check_fontbakery_version_live_apis"
|
||||
# AssertionError
|
||||
"test_check_shape_languages"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
|
@ -5,6 +5,7 @@
|
||||
protobuf,
|
||||
pytestCheckHook,
|
||||
pythonOlder,
|
||||
regex,
|
||||
setuptools,
|
||||
setuptools-scm,
|
||||
uharfbuzz,
|
||||
@ -13,29 +14,33 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "gflanguages";
|
||||
version = "0.6.2";
|
||||
version = "0.6.5";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-v93mXDwHT/8Tau78ApLUR+dQCpL9jmRQp0BT5y/sfq4=";
|
||||
hash = "sha256-wMhRVWdjKiEfzswnAWqKfzHrpJj0U4q8tzDBGshNryo=";
|
||||
};
|
||||
|
||||
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
|
||||
# in the closure of fontbakery. It seems to be compatible enough.
|
||||
pythonRelaxDeps = [ "protobuf" ];
|
||||
|
||||
env.PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION = "python";
|
||||
|
||||
build-system = [
|
||||
setuptools
|
||||
setuptools-scm
|
||||
];
|
||||
|
||||
dependencies = [ protobuf ];
|
||||
dependencies = [
|
||||
protobuf
|
||||
regex
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
@ -43,6 +48,14 @@ buildPythonPackage rec {
|
||||
youseedee
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "gflanguages" ];
|
||||
|
||||
disabledTests = [
|
||||
# AssertionError
|
||||
"test_exemplars_are_in_script"
|
||||
"test_sample_texts_are_in_script"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python library for Google Fonts language metadata";
|
||||
homepage = "https://github.com/googlefonts/lang";
|
||||
|
@ -114,6 +114,8 @@ buildPythonPackage rec {
|
||||
--replace-fail "'gftools" "'${placeholder "out"}t/bin/gftools"
|
||||
'';
|
||||
|
||||
env.PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION = "python";
|
||||
|
||||
pythonRelaxDeps = [
|
||||
"protobuf"
|
||||
"pygit2"
|
||||
|
@ -1,16 +1,17 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
defcon,
|
||||
fetchPypi,
|
||||
fonttools,
|
||||
gflanguages,
|
||||
glyphslib,
|
||||
pytestCheckHook,
|
||||
pythonOlder,
|
||||
pyyaml,
|
||||
requests,
|
||||
setuptools,
|
||||
setuptools-scm,
|
||||
setuptools,
|
||||
unicodedata2,
|
||||
}:
|
||||
|
||||
@ -19,11 +20,15 @@ buildPythonPackage rec {
|
||||
version = "1.0.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-fa+W1IGIZcn1P1xNKm1Yb/TOuf4QdDVnIvlDkOLOcLY=";
|
||||
};
|
||||
|
||||
env.PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION = "python";
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace-fail "setuptools_scm>=8.0.4,<8.1" "setuptools_scm"
|
||||
@ -53,13 +58,16 @@ buildPythonPackage rec {
|
||||
disabledTests = [
|
||||
# This "test" just tries to connect to PyPI and look for newer releases. Not needed.
|
||||
"test_dependencies"
|
||||
# AssertionError
|
||||
"test_definitions"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Google Fonts glyph set metadata";
|
||||
mainProgram = "glyphsets";
|
||||
homepage = "https://github.com/googlefonts/glyphsets";
|
||||
changelog = "https://github.com/googlefonts/glyphsets/blob/v${version}/CHANGELOG.md";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ danc86 ];
|
||||
mainProgram = "glyphsets";
|
||||
};
|
||||
}
|
||||
|
@ -6,9 +6,10 @@
|
||||
num2words,
|
||||
protobuf,
|
||||
pytestCheckHook,
|
||||
pythonOlder,
|
||||
pyyaml,
|
||||
setuptools,
|
||||
setuptools-scm,
|
||||
setuptools,
|
||||
strictyaml,
|
||||
termcolor,
|
||||
ufo2ft,
|
||||
@ -18,17 +19,29 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "shaperglot";
|
||||
version = "0.5.0";
|
||||
version = "0.6.4";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
# PyPI source tarballs omit tests, fetch from Github instead
|
||||
src = fetchFromGitHub {
|
||||
owner = "googlefonts";
|
||||
repo = "shaperglot";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-jmYB1tsMMpFs0X/FW3z9el2nFr8De2jR1dO658w7U4Q=";
|
||||
hash = "sha256-O6z7TJpC54QkqX5/G1HKSvaDYty7B9BnCQ4FpsLsEMs=";
|
||||
};
|
||||
|
||||
pyproject = true;
|
||||
env.PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION = "python";
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace-fail "setuptools>=75.0.0" "setuptools"
|
||||
'';
|
||||
|
||||
build-system = [
|
||||
setuptools
|
||||
setuptools-scm
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
gflanguages
|
||||
@ -41,19 +54,17 @@ buildPythonPackage rec {
|
||||
vharfbuzz
|
||||
youseedee
|
||||
];
|
||||
build-system = [
|
||||
setuptools
|
||||
setuptools-scm
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
|
||||
pythonImportsCheck = [ "shaperglot" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Tool to test OpenType fonts for language support";
|
||||
mainProgram = "shaperglot";
|
||||
homepage = "https://github.com/googlefonts/shaperglot";
|
||||
changelog = "https://github.com/googlefonts/shaperglot/releases/tag/v${version}";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ danc86 ];
|
||||
mainProgram = "shaperglot";
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user