From b81d4da93ad900dfde3e9ef85450067fd09e7b98 Mon Sep 17 00:00:00 2001 From: Nicolas Graves Date: Sat, 4 Oct 2025 00:55:00 +0200 Subject: [PATCH] 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 --- gnu/packages/python-xyz.scm | 43 +++++++++++++++---------------------- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 35c2cd17fa68f0eb89ad52870b63cdeb4eb1ac7d..c547456444151fb8a3211d4a37aa86592e1148b6 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -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.")