gnu: s3cmd: Switch to pyproject.

* gnu/packages/python-xyz.scm (s3cmd):
[build-system]: Switch to pyproject-build-system.
[arguments]<#:tests?>: Disable them.
<#:phases>: Add 'check phase to clarify how tests are supposed to be
run.  Improve style.
[native-inputs]: Add python-setuptools-next.
[inputs]: Improve style.

Change-Id: Ife22d6596387c179b1c44f8f8ae8b54ddcca195b
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
This commit is contained in:
Nicolas Graves 2025-09-06 17:33:44 +02:00 committed by Sharlatan Hellseher
parent 1fdf3c2f60
commit 31ad41fa9a
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -22257,19 +22257,26 @@ the same purpose: to provide Python bindings for libmagic.")
(file-name (git-file-name name version))
(sha256
(base32 "0rdgwwmmp8mdxc84bxq6k9a7v7z2qgc3df47djzs2b84gw81dglx"))))
(build-system python-build-system)
(build-system pyproject-build-system)
(arguments
(list #:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'hide-wrapping
(lambda _
(substitute* "S3/MultiPart.py"
(("sys\\.argv\\[0\\]") "\"s3cmd\""))
(substitute* "s3cmd"
(("optparser\\.get_prog_name\\(\\)") "\"s3cmd\"")))))))
(inputs
(list python-dateutil
python-magic))
(list
#:tests? #f ; XXX: Tests require network access.
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'hide-wrapping
(lambda _
(substitute* "S3/MultiPart.py"
(("sys\\.argv\\[0\\]")
"\"s3cmd\""))
(substitute* "s3cmd"
(("optparser\\.get_prog_name\\(\\)")
"\"s3cmd\""))))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(invoke "python" "run-tests.py")))))))
(native-inputs (list python-setuptools-next))
(inputs (list python-dateutil python-magic))
(home-page "https://s3tools.org/s3cmd")
(synopsis "Command line tool for S3-compatible storage services")
(description