From: Morgan Smith <Morgan.J.Smith@outlook.com>
To: 63422@debbugs.gnu.org
Subject: [bug#63422] [PATCH 3/3] gnu: libfive: Generate bindings instead of using pre-generated ones.
Date: Wed, 10 May 2023 13:46:20 -0400 [thread overview]
Message-ID: <DM5PR03MB31634823E5124CF36B48FB51C5779@DM5PR03MB3163.namprd03.prod.outlook.com> (raw)
In-Reply-To: <c6e9290bb908170ceb04988ee95e73f4995368b9.1683740776.git.Morgan.J.Smith@outlook.com>
* 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
prev parent reply other threads:[~2023-05-10 17:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <c6e9290bb908170ceb04988ee95e73f4995368b9.1683740776.git.Morgan.J.Smith@outlook.com>
2023-05-10 17:46 ` [bug#63422] [PATCH 2/3] gnu: libfive: Add Python bindings Morgan Smith
2023-05-10 17:46 ` Morgan Smith [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DM5PR03MB31634823E5124CF36B48FB51C5779@DM5PR03MB3163.namprd03.prod.outlook.com \
--to=morgan.j.smith@outlook.com \
--cc=63422@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).