summaryrefslogtreecommitdiff
path: root/gnu/packages/python-xyz.scm
diff options
context:
space:
mode:
authorNicolas Graves <ngraves@ngraves.fr>2025-10-05 13:27:55 +0200
committerSharlatan Hellseher <sharlatanus@gmail.com>2025-10-05 17:09:11 +0100
commit44f7ad2fc6519855ce98ed8eaebef9196c9e100a (patch)
tree5eeb60bcaa5e1e34bc6ab18eec044f5987b41c48 /gnu/packages/python-xyz.scm
parent267951cfe2ff6233f8f416804d8e1f8fd7e47873 (diff)
gnu: python-pydub: Switch to pyproject.
* gnu/packages/python-xyz.scm (python-pydub): [source]: Switch to git-fetch. [build-system]: Switch to pyproject-build-system. [arguments]<#:phases>: Refresh them, use search-input-file. <#:test-backend>: Set it. [native-inputs]: Add python-setuptools. Change-Id: I2331423a8d4218f4a7f1f562b9fb62f8fb1500b3 Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Diffstat (limited to 'gnu/packages/python-xyz.scm')
-rw-r--r--gnu/packages/python-xyz.scm49
1 files changed, 26 insertions, 23 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 9823cceb57..803eab763a 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27674,32 +27674,35 @@ version of @code{SocksiPy} with bug fixes and extra features.")
(version "0.25.1")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "pydub" version))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/jiaaro/pydub")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
(sha256
- (base32
- "03ykn2kp6qglsrzqi5h79z5cp3kl9mknasv0d6jv5jj9k77362lq"))))
- (build-system python-build-system)
+ (base32 "0xskllq66wqndjfmvp58k26cv3w480sqsil6ifwp4gghir7hqc8m"))))
+ (build-system pyproject-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'fix-ffmpeg-path
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((ffmpeg (assoc-ref inputs "ffmpeg")))
- (substitute* '("pydub/utils.py")
- (("return \"ffmpeg\"")
- (string-append "return \"" ffmpeg "/bin/ffmpeg\""))
- (("return \"ffplay\"")
- (string-append "return \"" ffmpeg "/bin/ffplay\""))
- (("return \"ffprobe\"")
- (string-append "return \"" ffmpeg "/bin/ffprobe\""))
- (("warn\\(\"Couldn't find ff") "# warn\\(\"Couldn't find ff"))
- #t))))))
+ (list
+ #:test-backend ''unittest
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-ffmpeg-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((bin (dirname (search-input-file inputs "bin/ffmpeg"))))
+ (substitute* "pydub/utils.py"
+ (("return \"ffmpeg\"")
+ (string-append "return \"" bin "/ffmpeg\""))
+ (("return \"ffplay\"")
+ (string-append "return \"" bin "/ffplay\""))
+ (("return \"ffprobe\"")
+ (string-append "return \"" bin "/ffprobe\""))
+ (("warn\\(\"Couldn't find ff")
+ "# warn\\(\"Couldn't find ff"))))))))
+ (native-inputs (list python-setuptools))
(home-page "https://pydub.com")
- (inputs
- (list ffmpeg))
- (propagated-inputs
- (list python-scipy))
+ (inputs (list ffmpeg))
+ (propagated-inputs (list python-scipy))
(synopsis "Manipulate audio with a high level interface in Python")
(description
"@code{pydub} makes it easy to manipulate audio in Python. It relies on