From ea571d67f42c27a032fc96c400f2db1f8ed369b3 Mon Sep 17 00:00:00 2001 From: Nicolas Graves Date: Thu, 31 Jul 2025 23:13:40 +0200 Subject: 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 --- gnu/packages/time.scm | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) (limited to 'gnu') 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 -- cgit v1.3