From 3454c6e17d87ed9e965f5d1d8dd62a791b2eaa3f Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Sun, 17 Aug 2025 00:06:20 +0100 Subject: [PATCH] gnu: python-freetype-py: Move to fontutils. * gnu/packages/python-xyz.scm (python-freetype-py): Move from here ... * gnu/packages/fontutils.scm: ... to here. * gnu/packages/gnome-xyz.scm: Add fontutils module. Change-Id: Ic5c3d9a360bfb5e1214c73144619863f83a2db97 --- gnu/packages/fontutils.scm | 42 +++++++++++++++++++++++++++++++++++++ gnu/packages/gnome-xyz.scm | 1 + gnu/packages/python-xyz.scm | 41 ------------------------------------ 3 files changed, 43 insertions(+), 41 deletions(-) diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm index 8603f7224f350f181a151afa1e515ead3831bd13..df6dc142d3d65f5cfdb198574cb58ec4a04c31f0 100644 --- a/gnu/packages/fontutils.scm +++ b/gnu/packages/fontutils.scm @@ -14,6 +14,7 @@ ;;; Copyright © 2020, 2021, 2024 Nicolas Goaziou ;;; Copyright © 2021-2024 Maxim Cournoyer ;;; Copyright © 2021 Sarah Morgensen +;;; Copyright © 2022 Eric Bavier ;;; Copyright © 2022 Felipe Balbi ;;; Copyright © 2023 gemmaro ;;; Copyright © 2023 John Kehayias @@ -692,6 +693,47 @@ process. FontParts is the successor of RoboFab.") (alist-delete 'hidden? (package-properties python-fontparts-bootstrap))))) +(define-public python-freetype-py + (package + (name "python-freetype-py") + (version "2.5.1") + (source + (origin + (method git-fetch) ;no tests in PyPI archive + (uri (git-reference + (url "https://github.com/rougier/freetype-py") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0cls0469zfqzwpq6k4pxa9vrczsqabqk4qh7444xybcyq9qgs1lp")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags #~(list "tests") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-lib-paths + (lambda _ + (substitute* "freetype/raw.py" + (("ctypes.util.find_library\\('freetype'\\)") + (format #f "'~a/~a'" #$(this-package-input "freetype") + "lib/libfreetype.so"))))) + (add-before 'build 'set-version + (lambda _ + (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version)))))) + (native-inputs + (list python-pytest + python-setuptools + python-setuptools-scm)) + (inputs + (list freetype)) + (home-page "https://github.com/rougier/freetype-py") + (synopsis "Freetype python bindings") + (description + "Freetype Python provides bindings for the FreeType library. Only the +high-level API is bound.") + (license license:bsd-3))) + (define-public python-glyphslib (package (name "python-glyphslib") diff --git a/gnu/packages/gnome-xyz.scm b/gnu/packages/gnome-xyz.scm index 720195c2614e6059a5344bc351208b50891c7f3f..5e3408d8c39de7e0ab01f9b3b567e85584095f7b 100644 --- a/gnu/packages/gnome-xyz.scm +++ b/gnu/packages/gnome-xyz.scm @@ -64,6 +64,7 @@ #:use-module (gnu packages bash) #:use-module (gnu packages build-tools) #:use-module (gnu packages check) + #:use-module (gnu packages fontutils) #:use-module (gnu packages freedesktop) #:use-module (gnu packages gettext) #:use-module (gnu packages gl) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 0dc04f0faf01c4e54ae4b37e0e4e3166d3889d56..231efc0c6ccf8aa114d4d40ede28caa50c163654 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -33257,47 +33257,6 @@ dumping of JSON5 data structures.") Foundation maintained libraries.") (license license:expat))) -(define-public python-freetype-py - (package - (name "python-freetype-py") - (version "2.5.1") - (source - (origin - (method git-fetch) ;no tests in PyPI archive - (uri (git-reference - (url "https://github.com/rougier/freetype-py") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 "0cls0469zfqzwpq6k4pxa9vrczsqabqk4qh7444xybcyq9qgs1lp")))) - (build-system pyproject-build-system) - (arguments - (list - #:test-flags #~(list "tests") - #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'patch-lib-paths - (lambda _ - (substitute* "freetype/raw.py" - (("ctypes.util.find_library\\('freetype'\\)") - (format #f "'~a/~a'" #$(this-package-input "freetype") - "lib/libfreetype.so"))))) - (add-before 'build 'set-version - (lambda _ - (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version)))))) - (native-inputs - (list python-pytest - python-setuptools - python-setuptools-scm)) - (inputs - (list freetype)) - (home-page "https://github.com/rougier/freetype-py") - (synopsis "Freetype python bindings") - (description - "Freetype Python provides bindings for the FreeType library. Only the -high-level API is bound.") - (license license:bsd-3))) - (define-public python-frozendict (package (name "python-frozendict")