[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
329/401: build-system/cmake: Wrap Python executables, too.
From: |
guix-commits |
Subject: |
329/401: build-system/cmake: Wrap Python executables, too. |
Date: |
Tue, 18 Aug 2020 16:22:10 -0400 (EDT) |
dannym pushed a commit to branch wip-desktop
in repository guix.
commit 185e7a780d9473103b315321cd86e24c284eadb5
Author: Raghav Gururajan <raghavgururajan@disroot.org>
AuthorDate: Fri Aug 14 15:34:08 2020 +0200
build-system/cmake: Wrap Python executables, too.
* guix/build-system/cmake.scm (%cmake-build-system-modules): Add
%glib-or-gtk-build-system-modules, %python-build-system-modules.
Remove %gnu-build-system-modules.
(lower): Add #:glib-or-gtk? and #:python? to private-keywords.
(cmake-build): Add #:python? to formal parameters and pass it to...
* guix/build/cmake-build-system.scm (cmake-build): ...this.
(install-glib-or-gtk): New procedure.
(install-python): New procedure.
(%standard-phases)[install-glib-or-gtk]: New phase.
[install-python]: New phase.
Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
---
guix/build-system/cmake.scm | 13 +++++++++++--
guix/build/cmake-build-system.scm | 17 ++++++++++++++++-
2 files changed, 27 insertions(+), 3 deletions(-)
diff --git a/guix/build-system/cmake.scm b/guix/build-system/cmake.scm
index f590b6e..e861756 100644
--- a/guix/build-system/cmake.scm
+++ b/guix/build-system/cmake.scm
@@ -26,6 +26,8 @@
#:use-module (guix search-paths)
#:use-module (guix build-system)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system glib-or-gtk)
+ #:use-module (guix build-system python)
#:use-module (guix packages)
#:use-module (ice-9 match)
#:export (%cmake-build-system-modules
@@ -42,7 +44,10 @@
(define %cmake-build-system-modules
;; Build-side modules imported by default.
`((guix build cmake-build-system)
- ,@%gnu-build-system-modules))
+ ;; The modules from glib-or-gtk contains the modules from gnu-build-system,
+ ;; so there is no need to import that too.
+ ,@%glib-or-gtk-build-system-modules
+ ,@%python-build-system-modules))
(define (default-cmake target)
"Return the default CMake package."
@@ -61,7 +66,7 @@
#:rest arguments)
"Return a bag for NAME."
(define private-keywords
- `(#:source #:cmake #:inputs #:native-inputs #:outputs
+ `(#:source #:cmake #:inputs #:native-inputs #:outputs #:glib-or-gtk?
#:python?
,@(if target '() '(#:target))))
(bag
@@ -104,6 +109,8 @@
(build-type "RelWithDebInfo")
(tests? #t)
(test-target "test")
+ (glib-or-gtk? #f)
+ (python? #f)
(parallel-build? #t) (parallel-tests? #t)
(validate-runpath? #t)
(patch-shebangs? #t)
@@ -141,6 +148,8 @@ provides a 'CMakeLists.txt' file as its build system."
#:out-of-source? ,out-of-source?
#:build-type ,build-type
#:tests? ,tests?
+ #:glib-or-gtk? ,glib-or-gtk?
+ #:python? ,python?
#:test-target ,test-target
#:parallel-build? ,parallel-build?
#:parallel-tests? ,parallel-tests?
diff --git a/guix/build/cmake-build-system.scm
b/guix/build/cmake-build-system.scm
index d1ff507..82e272e 100644
--- a/guix/build/cmake-build-system.scm
+++ b/guix/build/cmake-build-system.scm
@@ -21,6 +21,8 @@
(define-module (guix build cmake-build-system)
#:use-module ((guix build gnu-build-system) #:prefix gnu:)
+ #:use-module ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
+ #:use-module ((guix build python-build-system) #:prefix python:)
#:use-module (guix build utils)
#:use-module (ice-9 match)
#:export (%standard-phases
@@ -84,13 +86,26 @@
(gnu-check #:tests? tests? #:test-target test-target
#:parallel-tests? parallel-tests?)))
+(define* (install-glib-or-gtk #:key glib-or-gtk? #:allow-other-keys #:rest
rest)
+ (if glib-or-gtk?
+ (and (apply (assoc-ref glib-or-gtk:%standard-phases
'glib-or-gtk-compile-schemas) rest)
+ (apply (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)
rest))
+ #t))
+
+(define* (install-python #:key python? #:allow-other-keys #:rest rest)
+ (if python?
+ (apply (assoc-ref python:%standard-phases 'wrap) rest)
+ #t))
+
(define %standard-phases
;; Everything is as with the GNU Build System except for the `configure'
;; and 'check' phases.
(modify-phases gnu:%standard-phases
(delete 'bootstrap)
(replace 'check check)
- (replace 'configure configure)))
+ (replace 'configure configure)
+ (add-after 'install 'install-glib-or-gtk install-glib-or-gtk)
+ (add-after 'install 'install-python install-python)))
(define* (cmake-build #:key inputs (phases %standard-phases)
#:allow-other-keys #:rest args)
- 377/401: gnu: ccextractor: Include python phases., (continued)
- 377/401: gnu: ccextractor: Include python phases., guix-commits, 2020/08/18
- 383/401: gnu: eog: Remove custom typelib wrap., guix-commits, 2020/08/18
- 398/401: Revert "gnu: libpeas: Include python phases.", guix-commits, 2020/08/18
- 399/401: Revert "gnu: gexiv2: Include python phases.", guix-commits, 2020/08/18
- 401/401: gnu: Add gnome desktop services., guix-commits, 2020/08/18
- 236/401: gnu: opencv: Disable structured_light test., guix-commits, 2020/08/18
- 316/401: gnu: wayland: Update package definition., guix-commits, 2020/08/18
- 318/401: gnu: Add eglexternalplatform., guix-commits, 2020/08/18
- 320/401: gnu: Add mozjs-68., guix-commits, 2020/08/18
- 325/401: build-system/glib-or-gtk: Include GI_TYPELIB_PATH in wrapper., guix-commits, 2020/08/18
- 329/401: build-system/cmake: Wrap Python executables, too.,
guix-commits <=
- 333/401: build-system/meson: Only include phases that are enabled., guix-commits, 2020/08/18
- 343/401: gnu: graphene: Include python phases., guix-commits, 2020/08/18
- 361/401: gnu: gom: Include python phases., guix-commits, 2020/08/18
- 364/401: gnu: libchamplain: Include python phases., guix-commits, 2020/08/18
- 365/401: gnu: libpeas: Include python phases., guix-commits, 2020/08/18
- 378/401: gnu: mediasdk: Include python phases., guix-commits, 2020/08/18
- 389/401: gnu: gedit: Replace custom typelib and python wraps., guix-commits, 2020/08/18
- 394/401: gnu: seed: Disable tests., guix-commits, 2020/08/18
- 298/401: gnu: gnome-terminal: Update package definition., guix-commits, 2020/08/18
- 308/401: gnu: Add brltty., guix-commits, 2020/08/18