* [bug#39754] [PATCH] gnu: z3: Build the Python bindings
@ 2020-02-23 15:14 Jakub Kądziołka
2020-02-23 16:32 ` [bug#39754] [PATCH v2] " Jakub Kądziołka
0 siblings, 1 reply; 4+ messages in thread
From: Jakub Kądziołka @ 2020-02-23 15:14 UTC (permalink / raw)
To: 39754
* gnu/packages/maths.scm (z3)[arguments]: Add the --python and
--pypkgdir flags to configure.
---
gnu/packages/maths.scm | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 535ba02ea6..db2dc2a884 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4181,7 +4181,12 @@ as equations, scalars, vectors, and matrices.")
"0hprcdwhhyjigmhhk6514m71bnmvqci9r8gglrqilgx424r6ff7q"))))
(build-system gnu-build-system)
(arguments
- `(#:phases
+ `(#:imported-modules ((guix build python-build-system)
+ ,@%gnu-build-system-modules)
+ #:modules ((guix build python-build-system)
+ (guix build gnu-build-system)
+ (guix build utils))
+ #:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-compatability
;; Versions after 4.8.3 have immintrin.h IFDEFed for Windows only.
@@ -4198,7 +4203,9 @@ as equations, scalars, vectors, and matrices.")
(replace 'configure
(lambda* (#:key inputs outputs #:allow-other-keys)
(invoke "./configure"
- (string-append "--prefix=" (assoc-ref outputs "out")))))
+ "--python"
+ (string-append "--prefix=" (assoc-ref outputs "out"))
+ (string-append "--pypkgdir=" (site-packages inputs outputs)))))
(add-after 'configure 'change-directory
(lambda _
(chdir "build")
--
2.25.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [bug#39754] [PATCH v2] gnu: z3: Build the Python bindings
2020-02-23 15:14 [bug#39754] [PATCH] gnu: z3: Build the Python bindings Jakub Kądziołka
@ 2020-02-23 16:32 ` Jakub Kądziołka
2020-02-23 16:48 ` Ludovic Courtès
0 siblings, 1 reply; 4+ messages in thread
From: Jakub Kądziołka @ 2020-02-23 16:32 UTC (permalink / raw)
To: 39754
* gnu/packages/maths.scm (z3)[arguments]: Add the --python and
--pypkgdir flags to configure.
---
Changed the #:modules argument to only import site-packages from (guix
build python-build-system) as, as Ludo' pointed out on IRC, it also
exports %standard-phases, which could conflict with (guix build
gnu-build-system).
I considered putting the Python bindings in a separate output; I decided not to
do so as this change increases `guix size z3' from 116.4 MiB to 117.5
MiB, which is barely noticeable.
gnu/packages/maths.scm | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 535ba02ea6..cab84a520b 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -33,6 +33,7 @@
;;; Copyright © 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2019 Steve Sprang <scs@stevesprang.com>
;;; Copyright © 2019 Robert Smith <robertsmith@posteo.net>
+;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -4181,7 +4182,12 @@ as equations, scalars, vectors, and matrices.")
"0hprcdwhhyjigmhhk6514m71bnmvqci9r8gglrqilgx424r6ff7q"))))
(build-system gnu-build-system)
(arguments
- `(#:phases
+ `(#:imported-modules ((guix build python-build-system)
+ ,@%gnu-build-system-modules)
+ #:modules (((guix build python-build-system) #:select (site-packages))
+ (guix build gnu-build-system)
+ (guix build utils))
+ #:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-compatability
;; Versions after 4.8.3 have immintrin.h IFDEFed for Windows only.
@@ -4198,7 +4204,9 @@ as equations, scalars, vectors, and matrices.")
(replace 'configure
(lambda* (#:key inputs outputs #:allow-other-keys)
(invoke "./configure"
- (string-append "--prefix=" (assoc-ref outputs "out")))))
+ "--python"
+ (string-append "--prefix=" (assoc-ref outputs "out"))
+ (string-append "--pypkgdir=" (site-packages inputs outputs)))))
(add-after 'configure 'change-directory
(lambda _
(chdir "build")
--
2.25.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [bug#39754] [PATCH v2] gnu: z3: Build the Python bindings
2020-02-23 16:32 ` [bug#39754] [PATCH v2] " Jakub Kądziołka
@ 2020-02-23 16:48 ` Ludovic Courtès
2020-02-23 16:59 ` bug#39754: " Jakub Kądziołka
0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2020-02-23 16:48 UTC (permalink / raw)
To: Jakub Kądziołka; +Cc: 39754
Hi!
Jakub Kądziołka <kuba@kadziolka.net> skribis:
> * gnu/packages/maths.scm (z3)[arguments]: Add the --python and
> --pypkgdir flags to configure.
Could you also mention the addition of #:modules and #:imported-modules?
> Changed the #:modules argument to only import site-packages from (guix
> build python-build-system) as, as Ludo' pointed out on IRC, it also
> exports %standard-phases, which could conflict with (guix build
> gnu-build-system).
>
> I considered putting the Python bindings in a separate output; I decided not to
> do so as this change increases `guix size z3' from 116.4 MiB to 117.5
> MiB, which is barely noticeable.
Makes sense to me.
LGTM, thanks!
Ludo’.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#39754: [PATCH v2] gnu: z3: Build the Python bindings
2020-02-23 16:48 ` Ludovic Courtès
@ 2020-02-23 16:59 ` Jakub Kądziołka
0 siblings, 0 replies; 4+ messages in thread
From: Jakub Kądziołka @ 2020-02-23 16:59 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 39754-done
[-- Attachment #1: Type: text/plain, Size: 1243 bytes --]
On Sun, Feb 23, 2020 at 05:48:48PM +0100, Ludovic Courtès wrote:
> Hi!
>
> Jakub Kądziołka <kuba@kadziolka.net> skribis:
>
> > * gnu/packages/maths.scm (z3)[arguments]: Add the --python and
> > --pypkgdir flags to configure.
>
> Could you also mention the addition of #:modules and #:imported-modules?
Sure thing!
>
> > Changed the #:modules argument to only import site-packages from (guix
> > build python-build-system) as, as Ludo' pointed out on IRC, it also
> > exports %standard-phases, which could conflict with (guix build
> > gnu-build-system).
> >
> > I considered putting the Python bindings in a separate output; I decided not to
> > do so as this change increases `guix size z3' from 116.4 MiB to 117.5
> > MiB, which is barely noticeable.
>
> Makes sense to me.
>
> LGTM, thanks!
Thanks! Pushed:
commit f6b4d395fd321d43fd548ba832c78320ac3f8d51
Author: Jakub Kądziołka <kuba@kadziolka.net>
Date: Sun Feb 23 16:11:30 2020 +0100
gnu: z3: Build the Python bindings
* gnu/packages/maths.scm (z3)[arguments]: Add the --python and
--pypkgdir flags to configure. To facilitate the latter, add
(guix build python-build-system) to #:modules and #:imported-modules.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-02-23 17:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-23 15:14 [bug#39754] [PATCH] gnu: z3: Build the Python bindings Jakub Kądziołka
2020-02-23 16:32 ` [bug#39754] [PATCH v2] " Jakub Kądziołka
2020-02-23 16:48 ` Ludovic Courtès
2020-02-23 16:59 ` bug#39754: " Jakub Kądziołka
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).