From aaf432248faac73ae27c69506151a0b06b4b84db Mon Sep 17 00:00:00 2001 From: Nicolas Graves Date: Sat, 22 Nov 2025 21:40:04 +0100 Subject: [PATCH] gnu: python-opentype-sanitizer: Update to 9.2.0. * gnu/packages/fontutils.scm (python-opentype-sanitizer): Update to 9.2.0. [source]: Switch to git-fetch. [build-system]: Switch to pyproject-build-system. [arguments]<#:phases>: Add phase 'set-version. Refresh phase 'unbundle-opentype-sanitizer. [native-inputs]: Add python-setuptools. Change-Id: I0dd0fae99bf22bbfdc58e3aa4f1f98b6acbc64ea Signed-off-by: Sharlatan Hellseher --- gnu/packages/fontutils.scm | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm index ab1cfe10047..3b252e5c6a4 100644 --- a/gnu/packages/fontutils.scm +++ b/gnu/packages/fontutils.scm @@ -879,30 +879,35 @@ different scripts and languages.") (define-public python-opentype-sanitizer (package (name "python-opentype-sanitizer") - (version "8.2.1") + (version "9.2.0") (source (origin - (method url-fetch) - (uri (pypi-uri "opentype-sanitizer" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/googlefonts/ots-python") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 "1wjy6chbnj9ic5yjxal6spln5jfzr8cigqs6ab0gj7q60dndrl5k")))) + (base32 "0ffk99vcwmwpy2wzky1b0vj5j0i9xw67mwk81dzj696f6sws1dkm")))) (build-system pyproject-build-system) (arguments (list #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'set-version + (lambda _ + (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version))) (add-after 'unpack 'unbundle-opentype-sanitizer (lambda* (#:key inputs #:allow-other-keys) - (delete-file-recursively "src/c") (substitute* "setup.py" - (("^cmdclass\\[\"download\"].*") "") - (("^cmdclass\\[\"build_ext\"].*") "") - (("^cmdclass\\[\"egg_info\"].*") "")) + (("^cmdclass\\[\"(download|build_ext|egg_info)\"].*") + "")) (substitute* "src/python/ots/__init__.py" (("^OTS_SANITIZE = .*") (format #f "OTS_SANITIZE = ~s~%" (search-input-file inputs "bin/ots-sanitize"))))))))) - (native-inputs (list python-pytest python-setuptools-scm python-setuptools)) + (native-inputs + (list python-pytest python-setuptools python-setuptools-scm)) (inputs (list opentype-sanitizer)) (home-page "https://github.com/googlefonts/ots-python") (synopsis "Python wrapper for OpenType Sanitizer")