diff options
| author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-08-16 23:58:17 +0100 |
|---|---|---|
| committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-09-25 09:36:17 +0100 |
| commit | fdc6700f2473c793ae67e8dbdecb2cd3a3701c2c (patch) | |
| tree | 58eaec87976ccf90e97a7b0bab0792328906b315 /gnu/packages/python-xyz.scm | |
| parent | a4de7d0f324f5d61279a474d4035a2269ea82808 (diff) | |
gnu: python-freetype-py: Update to 2.5.1.
* gnu/packages/python-xyz.scm (python-freetype-py): Update to 2.5.1. Use
G-expressions.
[source]: Swritch to git-fetch providing tests.
[build-system]: Use pyproject.
[arugmetns] <tests?>: Run tests.
<test-flags>: Run only tests for the main module.
<phases>: Rework 'embed-library-refrence into 'patch-lib-paths; add
'set-version.
[native-inputs]: Remove unzip; add python-pytest and python-setuptools.
Change-Id: Ic1d38a74a4c192b86dd20bde32b07d1293344097
Diffstat (limited to 'gnu/packages/python-xyz.scm')
| -rw-r--r-- | gnu/packages/python-xyz.scm | 51 |
1 files changed, 30 insertions, 21 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 7de9dd2e93..947ebd412a 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -33124,33 +33124,42 @@ Foundation maintained libraries.") (define-public python-freetype-py (package (name "python-freetype-py") - (version "2.3.0") + (version "2.5.1") (source (origin - (method url-fetch) - (uri (pypi-uri "freetype-py" version ".zip")) + (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 "1l55wzy21jmdayjna29ahzxrf2fp68580978rs6kap1a4zilrdpr")))) - (build-system python-build-system) - (native-inputs - (list python-setuptools-scm - unzip)) - (inputs (list freetype)) + (base32 "0cls0469zfqzwpq6k4pxa9vrczsqabqk4qh7444xybcyq9qgs1lp")))) + (build-system pyproject-build-system) (arguments - `(#:phases - ;; Note: the pypi archive does not contain tests, but running the check - ;; phase will at least test whether the module loads correctly. - (modify-phases %standard-phases - (add-before 'build 'embed-library-reference - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "freetype/raw.py" - (("^(filename = ).*" _ >) - (string-append > "\"" (search-input-file inputs "/lib/libfreetype.so") - "\"\n")))))))) + (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.") + (description + "Freetype Python provides bindings for the FreeType library. Only the +high-level API is bound.") (license license:bsd-3))) (define-public python-frozendict |
