mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-03 18:09:18 -05:00
gnu: python-freezegun: Adjust for Python 3.10.
* gnu/packages/check.scm (python-freezegun)[source](modules, snippet): New fields.
This commit is contained in:
parent
a20a934081
commit
c5860b97e9
1 changed files with 12 additions and 1 deletions
|
@ -2717,7 +2717,18 @@ (define-public python-freezegun
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (pypi-uri "freezegun" version))
|
(uri (pypi-uri "freezegun" version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "0ijlq32qvpm5zprfzbyzawpl9qjsknlxhryr1i0q84wl0sxd28nd"))))
|
(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)
|
(build-system python-build-system)
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list python-pytest))
|
(list python-pytest))
|
||||||
|
|
Loading…
Reference in a new issue