guix_mirror_bot pushed a commit to branch python-team
in repository guix.
commit 3a0ae14ba9caaf75ab4d82a63494e255d05afba9
Author: Nicolas Graves <[email protected]>
AuthorDate: Wed Jan 28 08:30:13 2026 +0100
gnu: libreoffice: Switch to pyproject.
* gnu/packages/libreoffice.scm (libreoffice):
[arguments]<#:modules, #:imported-modules>: Switch to
pyproject-build-system.
<#:phases>: Use site-packages in phase 'bin-and-desktop-install.
Change-Id: If333d833cfcc0286ac55ac028dba326a4b6cd794
Signed-off-by: Sharlatan Hellseher <[email protected]>
---
gnu/packages/libreoffice.scm | 34 +++++++++++++++-------------------
1 file changed, 15 insertions(+), 19 deletions(-)
diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm
index cd0deb80d1..ab9c00049f 100644
--- a/gnu/packages/libreoffice.scm
+++ b/gnu/packages/libreoffice.scm
@@ -934,9 +934,9 @@ commonly called @code{ftoa} or @code{dtoa}.")
(build-system glib-or-gtk-build-system)
(arguments
(list
- #:imported-modules `((guix build python-build-system)
- ,@%glib-or-gtk-build-system-modules)
- #:modules `(((guix build python-build-system) #:select (python-version))
+ #:imported-modules (append %glib-or-gtk-build-system-modules
+ %pyproject-build-system-modules)
+ #:modules `(((guix build pyproject-build-system) #:prefix py:)
(ice-9 textual-ports)
(srfi srfi-1)
(srfi srfi-26)
@@ -1047,13 +1047,9 @@ commonly called @code{ftoa} or @code{dtoa}.")
(add-after 'install 'bin-and-desktop-install
;; Create 'soffice' and 'libreoffice' symlinks to the executable
;; script.
- (lambda _
+ (lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out #$output)
- (python-libdir
- (string-append out "/lib/python"
- (python-version
- #$(this-package-input "python"))
- "/site-packages/")))
+ (python-site (py:site-packages inputs outputs)))
(define (symlink-output src dst)
(mkdir-p (dirname (string-append out dst)))
(symlink (string-append out src) (string-append out dst)))
@@ -1085,16 +1081,16 @@ commonly called @code{ftoa} or @code{dtoa}.")
(lambda _
(let ((file (get-string-all (current-input-port))))
(with-output-to-file
- (string-append python-libdir name ".py")
+ (string-append python-site "/" name ".py")
(lambda _
- (format (current-output-port) "~a"
- (string-append
- "import sys, os\n"
- "sys.path.append('"
- out "/lib/libreoffice/program" "')\n"
- "os.putenv('URE_BOOTSTRAP',
'vnd.sun.star.pathname:"
- out
"/lib/libreoffice/program/fundamentalrc')\n\n"
- file)))))))
+ (format (current-output-port) "\
+import sys, os
+sys.path.append('~a/lib/libreoffice/program')
+os.putenv('URE_BOOTSTRAP', \
+'vnd.sun.star.pathname:~a/lib/libreoffice/program/fundamentalrc')
+
+~a"
+ out out file))))))
(delete-file
(string-append out "/lib/libreoffice/program/" name ".py")))
(symlink-output "/lib/libreoffice/program/soffice"
@@ -1112,7 +1108,7 @@ commonly called @code{ftoa} or @code{dtoa}.")
(mkdir-p (string-append out "/share/icons/hicolor"))
(copy-recursively "sysui/desktop/icons/hicolor"
(string-append out "/share/icons/hicolor"))
- (mkdir-p python-libdir)
+ (mkdir-p python-site)
(for-each install-python-script
'("access2base" "mailmerge" "msgbox" "officehelper"
"pythonloader" "pythonscript" "scriptforge"