GNU bug report logs - #39754
[PATCH] gnu: z3: Build the Python bindings

Previous Next

Package: guix-patches;

Reported by: Jakub Kądziołka <kuba <at> kadziolka.net>

Date: Sun, 23 Feb 2020 15:14:02 UTC

Severity: normal

Tags: patch

Done: Jakub Kądziołka <kuba <at> kadziolka.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 39754 in the body.
You can then email your comments to 39754 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#39754; Package guix-patches. (Sun, 23 Feb 2020 15:14:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jakub Kądziołka <kuba <at> kadziolka.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 23 Feb 2020 15:14:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jakub Kądziołka <kuba <at> kadziolka.net>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: z3: Build the Python bindings
Date: Sun, 23 Feb 2020 16:14:10 +0100
* 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





Information forwarded to guix-patches <at> gnu.org:
bug#39754; Package guix-patches. (Sun, 23 Feb 2020 16:33:02 GMT) Full text and rfc822 format available.

Message #8 received at 39754 <at> debbugs.gnu.org (full text, mbox):

From: Jakub Kądziołka <kuba <at> kadziolka.net>
To: 39754 <at> debbugs.gnu.org
Subject: [PATCH v2] gnu: z3: Build the Python bindings
Date: Sun, 23 Feb 2020 17:32:45 +0100
* 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 <at> nicolasgoaziou.fr>
 ;;; Copyright © 2019 Steve Sprang <scs <at> stevesprang.com>
 ;;; Copyright © 2019 Robert Smith <robertsmith <at> posteo.net>
+;;; Copyright © 2020 Jakub Kądziołka <kuba <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#39754; Package guix-patches. (Sun, 23 Feb 2020 16:49:01 GMT) Full text and rfc822 format available.

Message #11 received at 39754 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Jakub Kądziołka <kuba <at> kadziolka.net>
Cc: 39754 <at> debbugs.gnu.org
Subject: Re: [bug#39754] [PATCH v2] gnu: z3: Build the Python bindings
Date: Sun, 23 Feb 2020 17:48:48 +0100
Hi!

Jakub Kądziołka <kuba <at> 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’.




Reply sent to Jakub Kądziołka <kuba <at> kadziolka.net>:
You have taken responsibility. (Sun, 23 Feb 2020 17:00:03 GMT) Full text and rfc822 format available.

Notification sent to Jakub Kądziołka <kuba <at> kadziolka.net>:
bug acknowledged by developer. (Sun, 23 Feb 2020 17:00:03 GMT) Full text and rfc822 format available.

Message #16 received at 39754-done <at> debbugs.gnu.org (full text, mbox):

From: Jakub Kądziołka <kuba <at> kadziolka.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 39754-done <at> debbugs.gnu.org
Subject: Re: [bug#39754] [PATCH v2] gnu: z3: Build the Python bindings
Date: Sun, 23 Feb 2020 17:59:56 +0100
[Message part 1 (text/plain, inline)]
On Sun, Feb 23, 2020 at 05:48:48PM +0100, Ludovic Courtès wrote:
> Hi!
> 
> Jakub Kądziołka <kuba <at> 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 <at> 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.
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 23 Mar 2020 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 34 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.