unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Amin Bandali <bandali@gnu.org>
To: Efraim Flashner <efraim@flashner.co.il>
Cc: 33764@debbugs.gnu.org
Subject: [bug#33764] [PATCH] gnu: z3: Update to 4.8.3 and add python{, 2}-z3 bindings.
Date: Mon, 17 Dec 2018 09:34:11 -0500	[thread overview]
Message-ID: <87efag6x3w.fsf@aminb.org> (raw)
In-Reply-To: <20181217072921.GG3468@macbook41> (Efraim Flashner's message of "Mon, 17 Dec 2018 09:29:21 +0200")

Hi Ludo’, Efraim,

Thank you both for the feedback.  I’ve responded below.

On 2018-12-17  9:29 AM, Efraim Flashner wrote:
> On Sun, Dec 16, 2018 at 04:18:16PM +0100, Ludovic Courtès wrote:
>> >      (native-inputs
>> > -     `(("python" ,python-2)))
>> > +     `(("which" ,(@ (gnu packages base) which))
>> > +       ("python" ,python-wrapper)))
>> 
>> Please add #:use-module (gnu packages which) so you don’t have to resort
>> to the @ notation.

Will do for the next version of the patch, thanks.

>> > +(define-public python-z3 z3)
>> 
>> Is this variable necessary?  Note that this does not create a
>> “python-z3” package.

I see!  I thought that it /would/ create a python-z3 package; but then
again I’m very much a Guix newb :) Since I added a python2-z3, I thought
I would also add a python-z3 for ‘symmetry’ in case someone expects it.

Should I then add a (define-public python-z3 (package inherit z3)) if we
decide to add the python2-z3 bindings?

>> > +(define-public python2-z3
>> > +  (package (inherit python-z3)
>> 
>> This definition cannot be in python.scm; it must be in the same file as
>> ‘z3’ or we can get “unbound variable” errors while loading either of
>> these two modules.

Oh I see.  If we choose to keep it (add it), I’ll move it to maths.scm.

>> Also, as we’re approaching end-of-life upstream for Python 2.x, we now
>> avoid creating “python2-” packages, unless we cannot avoid it for some
>> reason.  Do you think we could do without this “python2-z3” package?
>> 
>
> Currently our z3 package builds python2 bindings

What Efraim said.  Since the current z3 provides python2 bindings, I
thought I would preserve that option by adding a python2-z3 in case
anyone wants to continue to use the python2 bindings.

I’m Cc’ing Marius who’s one of the recent committers to the z3 package
definition.  Marius, any thoughts on whether we should keep the python2
bindings around or do away with them?

>> Could you send an updated patch?  If you think we really need
>> “python2-z3”, please make it a separate patch.

Sure.  I’ll send an update patch (or patches) once we figure out whether
we should keep the python2 bindings around.

>
> We should also check that the other packages that use z3 aren't
> expecting the python2 bindings when built with the python3 bindings.
>

Right.  grepping through the codebase, I see that only two other
packages depend on z3: cubicle (in maths.scm) and yosys (in fpga.scm).
cubicle is an ocaml package and doesn’t seem to use the python bindings
of z3, and yosys seems to only use z3 as an executable, not a library.

So, it appears to me that as of now, there are no packages that depend
on the python2 bindings of z3.  If so, do we drop python2-z3 (and also
python-z3) altogether and just switch z3 to python3?


Best,
amin

  reply	other threads:[~2018-12-17 14:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-16  4:05 [bug#33764] [PATCH] gnu: z3: Update to 4.8.3 and add python{, 2}-z3 bindings Amin Bandali
2018-12-16 15:18 ` Ludovic Courtès
2018-12-17  7:29   ` Efraim Flashner
2018-12-17 14:34     ` Amin Bandali [this message]
2018-12-21 17:02       ` Ludovic Courtès
2018-12-21 20:40         ` Marius Bakke
2018-12-21 23:41           ` Amin Bandali
2018-12-22 15:20             ` Amin Bandali
2018-12-23 17:33               ` bug#33764: " Ludovic Courtès

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=87efag6x3w.fsf@aminb.org \
    --to=bandali@gnu.org \
    --cc=33764@debbugs.gnu.org \
    --cc=efraim@flashner.co.il \
    /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).