diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/fonttools/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/fonttools/default.nix | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/fonttools/default.nix b/nixpkgs/pkgs/development/python-modules/fonttools/default.nix index e07ab3c0d953..6d48088a2660 100644 --- a/nixpkgs/pkgs/development/python-modules/fonttools/default.nix +++ b/nixpkgs/pkgs/development/python-modules/fonttools/default.nix @@ -4,6 +4,7 @@ , pythonOlder , isPyPy , fetchFromGitHub +, setuptools , setuptools-scm , fs , lxml @@ -14,38 +15,43 @@ , lz4 , scipy , munkres +, pycairo , matplotlib , sympy , xattr , skia-pathops , uharfbuzz , pytestCheckHook +, pytest_7 }: buildPythonPackage rec { pname = "fonttools"; - version = "4.46.0"; - format = "setuptools"; + version = "4.49.0"; + pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = pname; repo = pname; rev = "refs/tags/${version}"; - hash = "sha256-QpC1OWpqhJpzS59OG8A/nndWDoeYyAFUTIcsppLzM8Y="; + hash = "sha256-8xQVuAnIS/mwYKwI+ow0YArIP8wFTKWGLZ+NCgIFYok="; }; - nativeBuildInputs = [ setuptools-scm ]; + build-system = [ + setuptools + setuptools-scm + ]; - passthru.optional-dependencies = let + optional-dependencies = let extras = { ufo = [ fs ]; lxml = [ lxml ]; woff = [ (if isPyPy then brotlicffi else brotli) zopfli ]; unicode = lib.optional (pythonOlder "3.11") unicodedata2; graphite = [ lz4 ]; - interpolatable = [ (if isPyPy then munkres else scipy) ]; + interpolatable = [ pycairo (if isPyPy then munkres else scipy) ]; plot = [ matplotlib ]; symfont = [ sympy ]; type1 = lib.optional stdenv.isDarwin xattr; @@ -57,7 +63,9 @@ buildPythonPackage rec { }; nativeCheckInputs = [ - pytestCheckHook + # test suite fails with pytest>=8.0.1 + # https://github.com/fonttools/fonttools/issues/3458 + (pytestCheckHook.override { pytest = pytest_7; }) ] ++ lib.concatLists (lib.attrVals ([ "woff" # "interpolatable" is not included because it only contains 2 tests at the time of writing but adds 270 extra dependencies @@ -66,7 +74,7 @@ buildPythonPackage rec { "pathops" # broken ] ++ [ "repacker" - ]) passthru.optional-dependencies); + ]) optional-dependencies); pythonImportsCheck = [ "fontTools" ]; @@ -89,11 +97,17 @@ buildPythonPackage rec { "Tests/misc/plistlib_test.py" "Tests/pens" "Tests/ufoLib" + + # test suite fails with pytest>=8.0.1 + # https://github.com/fonttools/fonttools/issues/3458 + "Tests/ttLib/woff2_test.py" + "Tests/ttx/ttx_test.py" ]; meta = with lib; { homepage = "https://github.com/fonttools/fonttools"; description = "A library to manipulate font files from Python"; + changelog = "https://github.com/fonttools/fonttools/blob/${version}/NEWS.rst"; license = licenses.mit; maintainers = [ maintainers.sternenseemann ]; }; |