all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Jakub Kądziołka" <kuba@kadziolka.net>
To: 39754@debbugs.gnu.org
Subject: [bug#39754] [PATCH v2] gnu: z3: Build the Python bindings
Date: Sun, 23 Feb 2020 17:32:45 +0100	[thread overview]
Message-ID: <20200223163245.10253-1-kuba@kadziolka.net> (raw)
In-Reply-To: <20200223151410.30739-1-kuba@kadziolka.net>

* 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

  reply	other threads:[~2020-02-23 16:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2020-02-23 16:48   ` [bug#39754] [PATCH v2] " Ludovic Courtès
2020-02-23 16:59     ` bug#39754: " Jakub Kądziołka

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200223163245.10253-1-kuba@kadziolka.net \
    --to=kuba@kadziolka.net \
    --cc=39754@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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.