mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 21:20:33 +02:00
build-system: renpy: Drop reliance on python-build-system.
* guix/build/renpy-build-system.scm (enable-bytecode-determinism): New variable. (%standard-phases): Replace python:enable-bytecode-determinism with own variant. * guix/build-system/renpy.scm (%renpy-build-system-modules): Drop (guix build python-build-system). Fixes: guix/guix#7426 (“Migrate `renpy-build-system' to pyproject”)
This commit is contained in:
@@ -44,7 +44,6 @@
|
||||
(define %renpy-build-system-modules
|
||||
;; Build-side modules imported by default.
|
||||
`((guix build renpy-build-system)
|
||||
(guix build python-build-system)
|
||||
,@%default-gnu-imported-modules))
|
||||
|
||||
(define* (lower name
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
|
||||
(define-module (guix build renpy-build-system)
|
||||
#:use-module ((guix build gnu-build-system) #:prefix gnu:)
|
||||
#:use-module ((guix build python-build-system) #:prefix python:)
|
||||
#:use-module (guix build utils)
|
||||
#:use-module (ice-9 match)
|
||||
#:use-module (ice-9 ftw)
|
||||
@@ -28,6 +27,12 @@
|
||||
#:export (%standard-phases
|
||||
renpy-build))
|
||||
|
||||
(define* (enable-bytecode-determinism #:rest _)
|
||||
"Improve determinism of pyc and rpyc files."
|
||||
;; Same reasoning as in pyproject-build-system, see there…
|
||||
(setenv "PYTHONHASHSEED" "0")
|
||||
(setenv "PYTHONDONTWRITEBYTECODE" "1"))
|
||||
|
||||
(define* (build #:key game #:allow-other-keys)
|
||||
(for-each make-file-writable
|
||||
(find-files game (lambda (pred stat)
|
||||
@@ -96,7 +101,7 @@
|
||||
(define %standard-phases
|
||||
(modify-phases gnu:%standard-phases
|
||||
(add-after 'unpack 'enable-bytecode-determinism
|
||||
(assoc-ref python:%standard-phases 'enable-bytecode-determinism))
|
||||
enable-bytecode-determinism)
|
||||
(delete 'bootstrap)
|
||||
(delete 'configure)
|
||||
(replace 'build build)
|
||||
|
||||
Reference in New Issue
Block a user