GNU bug report logs -
#63422
[PATCH 0/3] gnu: libfive: Fixes
Previous Next
Reported by: Morgan.J.Smith <at> outlook.com
Date: Wed, 10 May 2023 17:23:01 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
* gnu/packages/engineering.scm (libfive)[phases]: Add phase 'generate-bindings
to generate the bindings
---
gnu/packages/engineering.scm | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index be7e235fcc..ec3071129e 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -941,6 +941,16 @@ (define-public libfive
(substitute* "libfive/bind/python/libfive/ffi.py"
(("os.environ.get\\('LIBFIVE_FRAMEWORK_DIR'\\)" m)
(string-append m " or \"" #$output "/lib/\"")))))
+ (add-before 'build 'generate-bindings
+ (lambda _
+ ;; These files already exist but we regenerate them from source
+ (with-directory-excursion "../source/libfive/stdlib"
+ (substitute* '("gen_scm.py" "gen_c.py" "gen_py.py")
+ (("datetime.now\\(\\)\\.strftime\\([^)]+)") "\"N/A\"")
+ (("os\\.getlogin\\(\\)") "\"guix\""))
+ (invoke "python" "gen_scm.py")
+ (invoke "python" "gen_c.py")
+ (invoke "python" "gen_py.py"))))
(add-after 'unpack 'do-not-build-guile-bindings
(lambda _
(delete-file "libfive/bind/guile/CMakeLists.txt")
--
2.39.2
This bug report was last modified 2 years and 99 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.