guix_mirror_bot pushed a commit to branch master
in repository guix.
commit ea571d67f42c27a032fc96c400f2db1f8ed369b3
Author: Nicolas Graves <[email protected]>
AuthorDate: Thu Jul 31 23:13:40 2025 +0200
gnu: python-pytimeparse: Switch to pyproject.
* gnu/packages/time.scm (python-pytimeparse):
[source]: Switch to git-fetch.
[build-system]: Switch to pyproject-build-system.
[arguments]<#:phases>: Add a 'cleanup phase. Replace the check phase.
[native-inputs]: Add python-setuptools, python-wheel.
Change-Id: Ic8aa640789556b8583e24069291003063c794a29
Signed-off-by: Sharlatan Hellseher <[email protected]>
---
gnu/packages/time.scm | 31 +++++++++++++++++++++++--------
1 file changed, 23 insertions(+), 8 deletions(-)
diff --git a/gnu/packages/time.scm b/gnu/packages/time.scm
index 63b8372c82..2fe41d1358 100644
--- a/gnu/packages/time.scm
+++ b/gnu/packages/time.scm
@@ -164,18 +164,33 @@ applications, and several support tools.")
(version "1.1.8")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "pytimeparse" version))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/wroberts/pytimeparse")
+ (commit version)))
+ (file-name (git-file-name name version))
(sha256
- (base32
- "02kaambsgpjx3zi42j6l11rwms2p35b9hsk4f3kdf979gd3kcqg8"))))
+ (base32 "1r5ybq2brdinqlvvdmfv2lz4g1hwz2zd6k21qwzzw17jfxdv2m6g"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'check 'cleanup
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (delete-file-recursively
+ (string-append (site-packages inputs outputs)
+ "/pytimeparse/tests"))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "python" "-m" "unittest")))))))
(native-inputs
- (list python-nose))
- (build-system python-build-system)
+ (list python-setuptools python-wheel))
(home-page "https://github.com/wroberts/pytimeparse")
(synopsis "Time expression parser")
- (description "This small Python module parses various kinds of time
-expressions.")
+ (description
+ "This small Python module parses various kinds of time expressions.")
(license expat)))
(define-public python-pytzdata