From ca4d2712225fc9979a60461caab455357c521a7e Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Thu, 6 Nov 2025 09:41:31 +0000 Subject: [PATCH] gnu: python-strict-rfc3339: Move to time. * gnu/packages/python-xyz.scm (python-strict-rfc3339): Move from here ... * gnu/packages/time.scm: ... to here. Change-Id: I3098ecf219fe4255c59611e293fd1a99a94eab37 --- gnu/packages/python-xyz.scm | 51 ----------------------------------- gnu/packages/time.scm | 54 ++++++++++++++++++++++++++++++++++++- 2 files changed, 53 insertions(+), 52 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index ad0e54236606c5986df35a8fe390cc8c7ad242aa..5519711ea3ac126313e44912172e52ef618c7e4a 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -34266,57 +34266,6 @@ statements in OFX files.") (description "This package provides a pure Python RFC3339 validator.") (license license:expat))) -(define-public python-strict-rfc3339 - (package - (name "python-strict-rfc3339") - (version "0.7") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/danielrichman/strict-rfc3339") - (commit (string-append "version-" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 "0b12bh9v9gwkm89kxbidxw2z81lg8fx1v5fzgs313v1wgx6qb09p")))) - (build-system pyproject-build-system) - ;; TODO: Convert to #:test-flags on the next python-team cycle. - (arguments - (list - #:phases - #~(modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv" - ;; The timestamp to local offset tests fail due to - ;; missing timezone data (see: - ;; https://github.com/danielrichman/strict-rfc3339/issues/9). - "-k" - #$@(if (or (target-x86-32?) (target-arm32?)) - ;; On 32-bit platforms the size of time_t is - ;; too small for these tests. - '("not LocalOffset and not TestTimestampToRFC3339UTCOffset") - '("not LocalOffset"))))))))) - (native-inputs (list python-pytest python-setuptools)) - (home-page "https://github.com/danielrichman/strict-rfc3339") - (synopsis "RFC3339 procedures library") - (description - "The @code{strict_rfc3339} Python module provides strict, simple, lightweight -@url{https://www.rfc-editor.org/rfc/rfc3339, RFC3339} (Date and Time on the -Internet: Timestamps) procedures. - -It enables or aims to: -@itemize -@item Convert UNIX timestamps to and from RFC3339. -@item Produce RFC3339 strings with a UTC offset (Z) or with the offset that -the C time module reports is the local timezone offset. -@item Be simple with minimal dependencies/libraries. -@item Avoid timezones as much as possible. -@item Be very strict and follow RFC3339. -@end itemize") - (license license:gpl3+))) - (define-public python-platformdirs (package (name "python-platformdirs") diff --git a/gnu/packages/time.scm b/gnu/packages/time.scm index d1a6d90507dcd2a3d6667e98a2ed56233c7d9c24..6b7ca75a759d26230a178b5b02f6c755d7f9e180 100644 --- a/gnu/packages/time.scm +++ b/gnu/packages/time.scm @@ -20,13 +20,14 @@ ;;; Copyright © 2020 Tanguy Le Carrour ;;; Copyright © 2021 Ryan Prior ;;; Copyright © 2021 Foo Chuan Wei +;;; Copyright © 2022 Maxim Cournoyer ;;; Copyright © 2022 Pradana AUMARS ;;; Copyright © 2023 Sharlatan Hellseher ;;; Copyright © 2024 Liliana Marie Prikler ;;; Copyright © 2024 Sharlatan Hellseher ;;; Copyright © 2024 Zheng Junjie <873216071@qq.com> ;;; Copyright © 2024 Vinicius Monego -;;; Copyright © 2024 Ricardo Wurmus +;;; Copyright © 2024, 2025 Ricardo Wurmus ;;; ;;; This file is part of GNU Guix. ;;; @@ -521,6 +522,57 @@ aniso8601.") timezone for given coordinates on earth entirely offline.") (license expat))) +(define-public python-strict-rfc3339 + (package + (name "python-strict-rfc3339") + (version "0.7") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/danielrichman/strict-rfc3339") + (commit (string-append "version-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0b12bh9v9gwkm89kxbidxw2z81lg8fx1v5fzgs313v1wgx6qb09p")))) + (build-system pyproject-build-system) + ;; TODO: Convert to #:test-flags on the next python-team cycle. + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "pytest" "-vv" + ;; The timestamp to local offset tests fail due to + ;; missing timezone data (see: + ;; https://github.com/danielrichman/strict-rfc3339/issues/9). + "-k" + #$@(if (or (target-x86-32?) (target-arm32?)) + ;; On 32-bit platforms the size of time_t is + ;; too small for these tests. + '("not LocalOffset and not TestTimestampToRFC3339UTCOffset") + '("not LocalOffset"))))))))) + (native-inputs (list python-pytest python-setuptools)) + (home-page "https://github.com/danielrichman/strict-rfc3339") + (synopsis "RFC3339 procedures library") + (description + "The @code{strict_rfc3339} Python module provides strict, simple, lightweight +@url{https://www.rfc-editor.org/rfc/rfc3339, RFC3339} (Date and Time on the +Internet: Timestamps) procedures. + +It enables or aims to: +@itemize +@item Convert UNIX timestamps to and from RFC3339. +@item Produce RFC3339 strings with a UTC offset (Z) or with the offset that +the C time module reports is the local timezone offset. +@item Be simple with minimal dependencies/libraries. +@item Avoid timezones as much as possible. +@item Be very strict and follow RFC3339. +@end itemize") + (license gpl3+))) + (define-public python-tzlocal (package (name "python-tzlocal")