unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Theodoros Foradis <theodoros.for@openmailbox.org>
Cc: 27461@debbugs.gnu.org
Subject: [bug#27461] [PATCH v2 2/2] gnu: Add python2-z3.
Date: Sat, 29 Jul 2017 23:03:14 +0200	[thread overview]
Message-ID: <87d18jgdm5.fsf@gnu.org> (raw)
In-Reply-To: <20170725161113.26165-2-theodoros.for@openmailbox.org> (Theodoros Foradis's message of "Tue, 25 Jul 2017 19:11:13 +0300")

Hi,

Theodoros Foradis <theodoros.for@openmailbox.org> skribis:

> From: Julien Lepiller <julien@lepiller.eu>
>
> * gnu/packages/python.scm (python2-z3): New variable.

[...]

> +(define-public python2-z3
> +  (package
> +    (inherit z3)
> +    (name "python2-z3")

Please add (synopsis "Python bindings to the Z3 theorem prover").

> +    (build-system python-build-system)
> +    (propagated-inputs
> +     `(("z3" ,z3)))

Can we avoid propagating it?

> +     (arguments
> +      `(#:python ,python-2
> +        #:phases
> +        (modify-phases %standard-phases
> +          (add-before 'build 'prepare
> +            (lambda* (#:key inputs #:allow-other-keys)

It would be nice to have comments in this procedure to help understand
what’s going on.

> +              (system* "python" "scripts/mk_make.py")
> +              (copy-file "build/python/z3/z3core.py"
> +                         "src/api/python/z3/z3core.py")
> +              (copy-file "build/python/z3/z3consts.py"
> +                         "src/api/python/z3/z3consts.py")

You can use (install-file "build/python/z3/z3consts.py" "src/api/python/z3").

> +              (chdir "src/api/python")
> +              (substitute* "z3/z3core.py"
> +                (("_dirs = \\[")
> +                 (string-append "_dirs = ['" (assoc-ref inputs "z3")
> +                                "/lib', ")))
> +              (substitute* "MANIFEST.in"
> +                ((".*") ""))
> +              (substitute* "setup.py"
> +                (("self.execute\\(.*") "\n")
> +                (("scripts=.*") "\n"))
> +              #t)))))))

Also, since Z3 already depends on Python, would it make sense to have a
single package?

Thanks,
Ludo’.

  reply	other threads:[~2017-07-29 21:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-23 15:50 [bug#27461] [PATCH] gnu: Add z3 Theodoros Foradis
2017-06-25  8:19 ` julien lepiller
2017-06-26 16:31   ` Theodoros Foradis
2017-07-20  9:22     ` Ludovic Courtès
2017-07-25 16:11       ` [bug#27461] [PATCH v2 1/2] " Theodoros Foradis
2017-07-25 16:11         ` [bug#27461] [PATCH v2 2/2] gnu: Add python2-z3 Theodoros Foradis
2017-07-29 21:03           ` Ludovic Courtès [this message]
2017-07-29 20:59         ` [bug#27461] [PATCH v2 1/2] gnu: Add z3 Ludovic Courtès
2017-08-01 12:14           ` Danny Milosavljevic
2017-08-01 12:30             ` Ludovic Courtès
2017-08-02 10:04               ` Theodoros Foradis
2017-08-02 10:10                 ` [bug#27461] [PATCH] gnu: Add python bindings to z3 Theodoros Foradis
2017-08-21 15:14                   ` bug#27461: " 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=87d18jgdm5.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=27461@debbugs.gnu.org \
    --cc=theodoros.for@openmailbox.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).