From 22088e1e141225bf99146d4db703092c85360a0f Mon Sep 17 00:00:00 2001 From: Nicolas Graves Date: Thu, 23 Oct 2025 19:57:03 +0200 Subject: [PATCH] gnu: python-rarfile: Update to 4.2. * gnu/packages/python-xyz.scm (python-rarfile): Update to 4.2. [source]: Switch to git-fetch. [build-system]: Switch to pyproject-build-system. [arguments]: Improve style. <#:phases>: Replace 'check phase with <#:test-backend, #:test-flags>. Improve style of phase 'patch. [native-inputs]: Add python-setuptools. [description]: Improve style. Change-Id: I754bd26e631110f7644f542028b5657ab9d328e7 Signed-off-by: Sharlatan Hellseher --- gnu/packages/python-xyz.scm | 56 +++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index b9962fc56964ac1f83a45df885b78b16da6fdffe..5611fe89e397d9d567f14fbd3dd2994c7d98a460 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -21663,37 +21663,39 @@ can also be used to get the exact location, font or color of the text.") (define-public python-rarfile (package (name "python-rarfile") - (version "4.0") - (source (origin - (method url-fetch) - (uri (pypi-uri "rarfile" version)) - (sha256 - (base32 - "1882wv9szcm29mnyhjmspyflyr2l7z73srn14w4dlnww49lqfm37")))) - (build-system python-build-system) + (version "4.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/markokr/rarfile") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1lm4vz4w0hrnzln7w10ijhdiwxy7gz45m44zw4fz7rdnn7c06b36")))) + (build-system pyproject-build-system) (arguments - `(#:tests? #f ;; The bsdtar utility is very limited and most tests fail. - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "rarfile.py" - ;; Disable unrar and unar, which are unavailable on Guix. - (("(unrar|unar)=True" all tool) (string-append tool "=False")) - ;; Hardcode path to bsdtar - (("\"bsdtar\"") - (string-append "\"" (assoc-ref inputs "libarchive") "/bin/bsdtar\""))) - #t)) - (replace 'check - (lambda* (#:key inputs tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv"))))))) - (native-inputs (list python-pytest)) + (list + #:tests? #f ;The bsdtar utility is very limited and most tests fail. + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "rarfile.py" + ;; Disable unrar and unar, which are unavailable on Guix. + (("(unrar|unar)=True" all tool) + (string-append tool "=False")) + ;; Hardcode path to bsdtar + (("\"bsdtar\"") + (format #f "~s" + (search-input-file inputs "bin/bsdtar"))))))))) + (native-inputs (list python-pytest python-setuptools)) (inputs (list libarchive)) (home-page "https://github.com/markokr/rarfile") (synopsis "RAR archive reader for Python") - (description "This is Python module for RAR archive reading. The interface -is made as zipfile like as possible.") + (description + "This is Python module for RAR archive reading. The interface is made as +zipfile like as possible.") (license license:isc))) (define-public python-slugid