gnu: python-bagit: Update to 1.9.0.

* gnu/packages/python-xyz.scm (python-bagit): Update to 1.9.0.
[source]: Fetch from GitHub.
[build-system]: Use pyproject-build-system.
[arguments]<#:phases>: Add phase 'pretend-version' after
'unpack'. Override the 'check' phase and run the test file manually.
[native-inputs]: Remove python-coverage, python-mock. Add
python-pytest, python-setuptools, python-wheel.

Change-Id: I9db21f4ab290ac426710b426d30be884f7c47c9a
This commit is contained in:
Vinicius Monego 2025-07-30 08:35:46 -03:00
parent 15c2b47df7
commit f10da5043b
No known key found for this signature in database
GPG key ID: 637B0B138065B68A

View file

@ -26978,17 +26978,31 @@ in pure Python.")
(define-public python-bagit (define-public python-bagit
(package (package
(name "python-bagit") (name "python-bagit")
(version "1.7.0") (version "1.9.0")
(source (source
(origin (origin
(method url-fetch) (method git-fetch) ; no tests in PyPI
(uri (pypi-uri "bagit" version)) (uri (git-reference
(url "https://github.com/LibraryOfCongress/bagit-python")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256 (sha256
(base32 (base32
"1m6y04qmig0b5hzb35lnaw3d2yfydb7alyr1579yblvgs3da6j7j")))) "12qfqha70vhc8pclq0kzv7xk0i44ramnlkphybv7419vdl4aay40"))))
(build-system python-build-system) (build-system pyproject-build-system)
(arguments
(list #:phases
#~(modify-phases %standard-phases
(add-before 'build 'pretend-version
(lambda _
(setenv "SETUPTOOLS_SCM_PRETEND_VERSION"
#$(package-version this-package))))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(invoke "pytest" "-vv" "test.py")))))))
(native-inputs (native-inputs
(list python-setuptools-scm python-coverage python-mock)) (list python-pytest python-setuptools python-setuptools-scm python-wheel))
(home-page "https://libraryofcongress.github.io/bagit-python/") (home-page "https://libraryofcongress.github.io/bagit-python/")
(synopsis "Create and validate BagIt packages") (synopsis "Create and validate BagIt packages")
(description "Bagit is a Python library and command line utility for working (description "Bagit is a Python library and command line utility for working