1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-29 13:31:16 +02:00

gnu: python-pymediainfo: Switch to pyproject.

* gnu/packages/python-xyz.scm (python-pymediainfo):
[source]: Switch to git-fetch.
[build-system]: Switch to pyproject-build-system.
[arguments]<#:phases>: Replace 'check phase replacement by
<#:test-flags>. Refresh 'patch-libmediainfo phase.
[native-inputs]: Add python-setuptools, remove python-setuptools-scm.

Change-Id: If9b94e31ad76e5704c6c5ec664a7b2ac509b9df8
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
This commit is contained in:
Nicolas Graves
2025-10-04 00:55:00 +02:00
committed by Sharlatan Hellseher
parent ac2d9c7ca7
commit b81d4da93a

View File

@@ -4235,33 +4235,24 @@ to CommonMark.")
(method url-fetch)
(uri (pypi-uri "pymediainfo" version))
(sha256
(base32
"0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
(build-system python-build-system)
(native-inputs
(list python-setuptools-scm python-pytest))
(inputs
(list libmediainfo))
(base32 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
(build-system pyproject-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-libmediainfo
(lambda _
(substitute* "pymediainfo/__init__.py"
(("libmediainfo.so.0")
(search-input-file %build-inputs
"/lib/libmediainfo.so.0")))))
(replace 'check
(lambda* (#:key tests? inputs outputs #:allow-other-keys)
(when tests?
(add-installed-pythonpath inputs outputs)
;; Skip the only failing test "test_parse_url" because it tries
;; to access the internet.
(invoke "pytest" "-vv" "-k" "not test_parse_url")))))))
(home-page
"https://github.com/sbraz/pymediainfo")
(synopsis
"Python wrapper for the mediainfo library")
(list
;; The only failing test requires internet access.
#:test-flags
#~(list "-k" "not test_parse_url")
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'patch-libmediainfo
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "pymediainfo/__init__.py"
(("libmediainfo.so.0")
(search-input-file inputs "/lib/libmediainfo.so.0"))))))))
(native-inputs (list python-pytest python-setuptools))
(inputs (list libmediainfo))
(home-page "https://github.com/sbraz/pymediainfo")
(synopsis "Python wrapper for the mediainfo library")
(description
"This package provides a Python wrapper for the mediainfo library to
access the technical and tag data for video and audio files.")