mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
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
This commit is contained in:
parent
a4de7d0f32
commit
fdc6700f24
1 changed files with 30 additions and 21 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue