summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-04-21 23:31:24 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-05-12 12:46:10 -0400
commit0efccc8f1881f8272a2eafb5b948047cf8912dec (patch)
tree64bea7ea9a3e708913eadf0c3468795d28e72e10
parent4d62953573ecf8a1e5616a4a7c1577d91ad9f57a (diff)
downloadguix-patches-0efccc8f1881f8272a2eafb5b948047cf8912dec.tar
guix-patches-0efccc8f1881f8272a2eafb5b948047cf8912dec.tar.gz
gnu: python-sphinx-autodoc-typehints: Update to 1.18.1.
* gnu/packages/sphinx.scm (python-sphinx-autodoc-typehints): Update to 1.18.1. [source]: Use git. [argument]: New field. [propagated-inputs]: Add python-sphinx. [native-inputs]: Remove python-dataclasses and python-sphinx. Add python-nptyping and python-setuptools-scm.
-rw-r--r--gnu/packages/sphinx.scm39
1 files changed, 31 insertions, 8 deletions
diff --git a/gnu/packages/sphinx.scm b/gnu/packages/sphinx.scm
index 4b485d53c0..5e0ac96ab6 100644
--- a/gnu/packages/sphinx.scm
+++ b/gnu/packages/sphinx.scm
@@ -50,6 +50,7 @@
#:use-module (gnu packages imagemagick)
#:use-module (gnu packages python)
#:use-module (gnu packages python-build)
+ #:use-module (gnu packages python-check)
#:use-module (gnu packages python-crypto)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
@@ -872,20 +873,42 @@ enabled web server.")
(define-public python-sphinx-autodoc-typehints
(package
(name "python-sphinx-autodoc-typehints")
- (version "1.11.1")
+ (version "1.18.1")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "sphinx-autodoc-typehints" version))
+ (method git-fetch) ;no tests in pypi archive
+ (uri (git-reference
+ (url "https://github.com/tox-dev/sphinx-autodoc-typehints")
+ (commit version)))
+ (file-name (git-file-name name version))
(sha256
(base32
- "086v9mg21pvfx0lfqjx2xf36hnzrsripfg345xi59f7xwb9scjr4"))))
+ "16yhpwfdmybir80a6892cnr98m58p19rklmjdlzhk3njx7di8jzp"))))
(build-system python-build-system)
- (propagated-inputs
- (list python-setuptools-scm python-sphinx))
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'build 'pretend-version
+ ;; The version string is usually derived via setuptools-scm, but
+ ;; without the git metadata available, the version string is set to
+ ;; '0.0.0'.
+ (lambda _
+ (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version)))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "pytest" "-vv" "tests"
+ ;; This test requires to download an objects.inv file
+ ;; from the Sphinx website.
+ "-k" "not test_format_annotation")))))))
+ (propagated-inputs (list python-sphinx))
(native-inputs
- (list python-dataclasses python-pytest python-sphinx
- python-sphobjinv python-typing-extensions))
+ (list python-nptyping
+ python-pytest
+ python-setuptools-scm
+ python-sphobjinv
+ python-typing-extensions))
(home-page "https://pypi.org/project/sphinx-autodoc-typehints/")
(synopsis "Type hints for the Sphinx autodoc extension")
(description "This extension allows you to use Python 3 annotations for