gnu: python-freezegun: Update to 1.5.3.

* gnu/packages/check.scm (python-freezegun): Update to 1.5.3.
  [source] <snippet>: Remove it as
  <https://github.com/spulec/freezegun/pull/397> was merged in 2021.
  [build-system]: Use pyproject.
  [arguments] <phases>: Use default 'check.
  [native-inputs]: Add python-setuptools and python-wheel.

Change-Id: Ia442db5e37060f972156f3af7ce748d3385cec8b
This commit is contained in:
Sharlatan Hellseher 2025-07-16 20:24:55 +01:00
parent abf0ddf04f
commit 0d2516297c
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -3385,37 +3385,20 @@ directories to be excluded from testing.")
(define-public python-freezegun
(package
(name "python-freezegun")
(version "1.2.2")
(version "1.5.3")
(source
(origin
(method url-fetch)
(uri (pypi-uri "freezegun" version))
(sha256
(base32 "0ijlq32qvpm5zprfzbyzawpl9qjsknlxhryr1i0q84wl0sxd28nd"))
(modules '((guix build utils)))
(snippet
;; Add an explicit case for static methods as they are callable
;; in Python 3.10, breaking this conditional.
;; XXX Taken from upstream pull request:
;; https://github.com/spulec/freezegun/pull/397
'(substitute* "freezegun/api.py"
(("if not callable\\(attr_value\\) or \
inspect\\.isclass\\(attr_value\\):")
"if (not callable(attr_value) or inspect.isclass(attr_value)\
or isinstance(attr_value, staticmethod)):")))))
(build-system python-build-system)
(base32 "0pmwcjf0vxmars4kncb35pvrckp0j97lya5aqzbzy2m56d721inp"))))
(build-system pyproject-build-system)
(native-inputs
(list python-pytest))
(list python-pytest
python-setuptools
python-wheel))
(propagated-inputs
(list python-dateutil))
(arguments
`(#:phases
(modify-phases %standard-phases
;; The tests are normally executed via `make test`, but the PyPi
;; package does not include the Makefile.
(replace 'check
(lambda _
(invoke "pytest" "-vv"))))))
(home-page "https://github.com/spulec/freezegun")
(synopsis "Test utility for mocking the datetime module")
(description