summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorNicolas Graves <ngraves@ngraves.fr>2025-12-22 18:14:42 +0100
committerSharlatan Hellseher <sharlatanus@gmail.com>2025-12-27 21:45:44 +0000
commitb1179ad62da4650a428cf681f5b03a9f3d56e86d (patch)
treef5f7fc7736bcbd8cce48e2977e01841fd9ab2a38 /gnu
parente1a9ae4b22fba4f37362ac9fcff0e028e060c7d4 (diff)
gnu: python-pytzdata: Switch to pyproject.
* gnu/packages/time.scm (python-pytzdata): [source]: Switch to git-fetch. [build-system]: Switch to pyproject-build-system. [arguments]<#:tests?>: Enable them. <#:phases>: Add phase 'use-poetry-core. [native-inputs]: Add python-poetry-core, python-pytest. [description]: Improve style. Change-Id: I98601c5448d1d467e882626a841410b936f81c72 Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/time.scm31
1 files changed, 19 insertions, 12 deletions
diff --git a/gnu/packages/time.scm b/gnu/packages/time.scm
index f2bf78f6a05..d7752cded3e 100644
--- a/gnu/packages/time.scm
+++ b/gnu/packages/time.scm
@@ -199,21 +199,28 @@ applications, and several support tools.")
(version "2020.1")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "pytzdata" version))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/sdispater/pytzdata")
+ (commit version)))
+ (file-name (git-file-name name version))
(sha256
- (base32
- "0h0md0ldhb8ghlwjslkzh3wcj4fxg3n43bj5sghqs2m06nri7yiy"))))
- (build-system python-build-system)
- ;; XXX: The PyPI distribution contains no tests, and the upstream
- ;; repository lacks a setup.py! How to build from git?
- (arguments '(#:tests? #f))
- (propagated-inputs
- (list python-cleo))
+ (base32 "1idzpps56wx2lqvflxhpb1isz1ijn9y91ffd6hfg6qv1zikj9xa4"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'use-poetry-core
+ (lambda _
+ ;; Patch to use the core poetry API.
+ (substitute* "pyproject.toml"
+ (("poetry.masonry.api") "poetry.core.masonry.api")))))))
+ (native-inputs (list python-poetry-core python-pytest))
+ (propagated-inputs (list python-cleo))
(home-page "https://github.com/sdispater/pytzdata")
(synopsis "Timezone database for Python")
- (description
- "This library provides a timezone database for Python.")
+ (description "This library provides a timezone database for Python.")
(license expat)))
(define-public python-tzdata