diff options
| author | Nicolas Graves <ngraves@ngraves.fr> | 2025-07-31 23:13:40 +0200 |
|---|---|---|
| committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-08-07 18:33:35 +0100 |
| commit | ea571d67f42c27a032fc96c400f2db1f8ed369b3 (patch) | |
| tree | 2a915001909813a4ab36b3b1cd30575bc4489b95 /gnu/packages/time.scm | |
| parent | 483ac59d8fca731cd00bcf286687a9eea613938f (diff) | |
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 <sharlatanus@gmail.com>
Diffstat (limited to 'gnu/packages/time.scm')
| -rw-r--r-- | gnu/packages/time.scm | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/gnu/packages/time.scm b/gnu/packages/time.scm index 63b8372c821..2fe41d1358b 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 |
