summaryrefslogtreecommitdiff
path: root/gnu/packages/games.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2021-01-23 21:16:39 -0500
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2021-02-01 11:53:50 -0500
commitb6a50fae1fc968f352bef254226f078b391c8c92 (patch)
treeccc89099d789e2365e2c90743ec88e203c053d1b /gnu/packages/games.scm
parentd7354701dc1623cd0754810ee6766569523be52d (diff)
gnu: fifengine: Do not alter PYTHONPATH.
* gnu/packages/games.scm (fifengine): Import the (guix build python-build-system) module. [phases]{check}: Simplify by using the 'add-installed-pythonpath' procedure. Remove trailing #t.
Diffstat (limited to 'gnu/packages/games.scm')
-rw-r--r--gnu/packages/games.scm28
1 files changed, 8 insertions, 20 deletions
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 1f9d784ddc..b059c52d07 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -3445,9 +3445,12 @@ Widgets, and allows users to create more.")
(build-system cmake-build-system)
(arguments
`(#:tests? #f ; TODO The test running fails to run some tests.
- #:modules ((srfi srfi-1)
- (guix build cmake-build-system)
- (guix build utils))
+ #:imported-modules ,(cons '(guix build python-build-system)
+ %cmake-build-system-modules)
+ #:modules ((guix build cmake-build-system)
+ ((guix build python-build-system) #:select (guix-pythonpath))
+ (guix build utils)
+ (srfi srfi-1))
#:configure-flags
(list
(string-append "-DOPENALSOFT_INCLUDE_DIR="
@@ -3474,30 +3477,15 @@ Widgets, and allows users to create more.")
(delete 'check)
(add-after 'install 'check
(lambda* (#:key inputs outputs tests? #:allow-other-keys)
- (define python-version
- (let* ((version (last (string-split
- (assoc-ref inputs "python")
- #\-)))
- (components (string-split version #\.))
- (major+minor (take components 2)))
- (string-join major+minor ".")))
-
(when tests?
- ;; Set PYTHONPATH so that python finds the installed modules.
- (setenv "PYTHONPATH"
- (string-append (getenv "PYTHONPATH") ":"
- (assoc-ref outputs "out")
- "/lib/python"
- python-version
- "/site-packages"))
+ (add-installed-pythonpath inputs outputs)
;; The tests require an X server.
(system "Xvfb :1 &")
(setenv "DISPLAY" ":1")
(setenv "XDG_RUNTIME_DIR" "/tmp")
;; Run tests
(chdir ,(string-append "../" name "-" version))
- (invoke "python3" "run_tests.py" "-a"))
- #t)))))
+ (invoke "python3" "run_tests.py" "-a")))))))
(inputs
`(("sdl2" ,sdl2)
("sdl2-image" ,sdl2-image)