(address . guix-patches@gnu.org)
From 97ddb86c30bfa7c349a48b0c16b5c5c29394e2e9 Mon Sep 17 00:00:00 2001
Message-Id: <97ddb86c30bfa7c349a48b0c16b5c5c29394e2e9.1694811122.git.mitchellschmeisser@librem.one>
From: Mitchell Schmeisser <mitchellschmeisser@librem.one>
Date: Fri, 15 Sep 2023 16:49:01 -0400
Subject: [PATCH] gnu: Added python-documentation
To: guix-patches@gnu.org
* gnu/packages/python.scm (python-documentation): New variable.
---
gnu/packages/python.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
Toggle diff (51 lines)
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 51d5f598d7..be1725619f 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -61,6 +61,7 @@
;;; Copyright © 2022 Philip McGrath <philip@philipmcgrath.com>
;;; Copyright © 2022 jgart <jgart@dismail.de>
;;; Copyright © 2021 Lars-Dominik Braun <lars@6xq.net>
+;;; Copyright © 2023 Mitchell Schmeisser <mitchellschmeisser@librem.one>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -644,6 +645,34 @@ (define-public python-debug
@url{https://pythonextensionpatterns.readthedocs.io/en/latest/debugging/debug.html},
for more information.")))
+(define-public python-documentation
+ (package (inherit python)
+ (name "python-documentation")
+ (outputs '("out"))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'check)
+ (add-before 'build 'cd-to-doc
+ (lambda _
+ (chdir "Doc")))
+ (replace 'build
+ (lambda _
+ (and (invoke "make" "texinfo")
+ (chdir "build/texinfo")
+ (invoke "make"))))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (invoke "make" "install-info" (string-append "infodir="
+ (assoc-ref outputs "out")
+ "/share/info")))))))
+ (native-inputs
+ (modify-inputs (package-native-inputs python)
+ (prepend python-sphinx
+ texinfo)))
+ (description "This package contains Python3 info pages.")))
+
(define* (wrap-python3 python
#:optional
(name (string-append (package-name python) "-wrapper")))
base-commit: 213516f0baf92b6f50bd0c2e005625c0b3421a6f
--
2.40.1
--
Mitchell Schmeisser
OpenPGP Fingerprint: 08 9F 0E 56 00 87 96 56 C4 63 69 1A 38 11 C0 0D C4
28 5E 27