unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: Efraim Flashner <efraim@flashner.co.il>
Cc: 50490@debbugs.gnu.org
Subject: [bug#50490] [PATCH 0/5] Some julia packages
Date: Mon, 27 Sep 2021 18:58:18 +0200	[thread overview]
Message-ID: <868rzi0xcl.fsf_-_@gmail.com> (raw)
In-Reply-To: <4c2974bdaa47fcb961ead03fe56c8b06ca9317cf.1631211286.git.efraim@flashner.co.il> (Efraim Flashner's message of "Wed, 22 Sep 2021 15:13:19 +0300")

Hi Efraim,

On mer., 22 sept. 2021 at 15:13, Efraim Flashner <efraim@flashner.co.il> wrote:
> * gnu/packages/julia-xyz.scm (julia-pycall): New variable.
> ---
>  gnu/packages/julia-xyz.scm | 79 +++++++++++++++++++++++++++++++++++++-
>  1 file changed, 78 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm
> index 3616ffd006..1038d3f80b 100644
> --- a/gnu/packages/julia-xyz.scm
> +++ b/gnu/packages/julia-xyz.scm
> @@ -26,7 +26,9 @@
>    #:use-module (guix git-download)
>    #:use-module (guix build-system julia)
>    #:use-module (gnu packages gcc)
> -  #:use-module (gnu packages julia-jll))
> +  #:use-module (gnu packages julia-jll)
> +  #:use-module (gnu packages python)
> +  #:use-module (gnu packages python-xyz))
>
>  (define-public julia-abstractffts
>    (package
> @@ -3038,6 +3040,81 @@ everything from run time algorithm choice to code generation at compile time.")
>  human-readable format.")
>      (license license:expat)))
>
> +(define-public julia-pycall
> +  (package
> +    (name "julia-pycall")
> +    (version "1.92.3")
> +    (source
> +      (origin
> +        (method git-fetch)
> +        (uri (git-reference
> +               (url "https://github.com/JuliaPy/PyCall.jl")
> +               (commit (string-append "v" version))))
> +        (file-name (git-file-name name version))
> +        (sha256
> +         (base32
> +          "07r99ni6nkxpyrp3wsb5qg4jxz7i2r08dyqbiffy2zm3g0bn88jq"))))
> +    (build-system julia-build-system)
> +    (arguments
> +     `(#:imported-modules ((guix build python-build-system)
> +                           ,@%julia-build-system-modules)
> +       #:modules ((guix build julia-build-system)
> +                  (guix build utils)
> +                  ((guix build python-build-system) #:prefix python:))
> +       #:phases
> +       (modify-phases %standard-phases
> +         (add-after 'unpack 'remove-conda
> +           (lambda _
> +             (substitute* "Project.toml"
> +               ((".*Conda.*") ""))
> +             (substitute* (list "src/PyCall.jl"
> +                                "test/runtests.jl")
> +               (("import Conda") ""))
> +             (substitute* "deps/depsutils.jl"
> +               (("Conda.PYTHONDIR") "\"/\""))
> +             #t))
> +         (add-after 'unpack 'set-python
> +           (lambda* (#:key inputs outputs #:allow-other-keys)
> +             (let ((python (assoc-ref inputs "python")))
> +               (setenv "PYCALL_JL_RUNTIME_PYTHON"
> +                       (string-append python "/bin/python3"))
> +               (with-output-to-file "deps/deps.jl"
> +                 (lambda _
> +                   (format #t
> +                           "const python = \"~a/bin/python3\"~@
> +                           const pyprogramname = \"~a/bin/python3\"~@
> +                           const libpython = \"~a/lib/libpython~a.so.1.0\"~@
> +                           const PYTHONHOME = \"~a\"~@
> +                           const pyversion_build = v\"~a\"~@
> +                           const conda = false~%"
> +                           python
> +                           python
> +                           python
> +                           (python:python-version python)
> +                           python
> +                           ,(package-version python))))
> +               #t)))
> +         (add-before 'check 'pre-check
> +           (lambda _
> +             (setenv "CI" "true")
> +             (setenv "JULIA_PKGEVAL" "true")
> +             #t)))))
> +    (propagated-inputs
> +     `(("julia-macrotools" ,julia-macrotools)
> +       ("julia-versionparsing" ,julia-versionparsing)))
> +    (inputs
> +     `(("python" ,python)))
> +    (native-inputs
> +     `(("python-numpy" ,python-numpy)))
> +    (home-page "https://github.com/JuliaPy/PyCall.jl")
> +    (synopsis "Call Python functions from the Julia language")
> +    (description "This package provides the ability to directly call and fully
> +interoperate with Python from the Julia language.  You can import arbitrary
> +Python modules from Julia, call Python functions (with automatic conversion of
> +types between Julia and Python), define Python classes from Julia methods, and
> +share large data structures between Julia and Python without copying them.")
> +    (license license:expat)))


LGTM!


Cheers,
simon




  reply	other threads:[~2021-09-27 17:24 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-09 18:16 [bug#50490] [PATCH 0/5] Some julia packages Efraim Flashner
2021-09-14 17:38 ` zimoun
2021-09-22 12:13 ` [bug#50490] [PATCH 1/5] gnu: Add julia-quadgk Efraim Flashner
2021-09-27 16:51   ` [bug#50490] [PATCH 0/5] Some julia packages zimoun
2021-09-22 12:13 ` [bug#50490] [PATCH 2/5] gnu: Add julia-measurements Efraim Flashner
2021-09-27 16:53   ` [bug#50490] [PATCH 0/5] Some julia packages zimoun
2021-09-22 12:13 ` [bug#50490] [PATCH 3/5] gnu: Add julia-mlstyle Efraim Flashner
2021-09-27 16:54   ` [bug#50490] [PATCH 0/5] Some julia packages zimoun
2021-09-22 12:13 ` [bug#50490] [PATCH 4/5] gnu: Add julia-pycall Efraim Flashner
2021-09-27 16:58   ` zimoun [this message]
2021-09-22 12:13 ` [bug#50490] [PATCH 5/5] gnu: Add julia-ansicoloredprinters Efraim Flashner
2021-09-27 16:59   ` [bug#50490] [PATCH 0/5] Some julia packages zimoun
     [not found] ` <handler.50490.B.163121156531751.ack@debbugs.gnu.org>
2021-09-30 12:35   ` bug#50490: Acknowledgement ([PATCH 0/5] Some julia packages) Efraim Flashner
  -- strict thread matches above, loose matches on Subject: below --
2021-09-14 13:08 [bug#50582] [PATCH 0/4] Julia-documenter Efraim Flashner
2021-09-14 13:11 ` [bug#50582] [PATCH 1/4] gnu: Add julia-libsass-jll Efraim Flashner
2021-09-27 17:01   ` [bug#50490] [PATCH 0/5] Some julia packages zimoun
2021-09-14 13:12 ` [bug#50582] [PATCH 2/4] gnu: Add julia-sass Efraim Flashner
2021-09-27 17:03   ` [bug#50490] [PATCH 0/5] Some julia packages zimoun
2021-09-14 18:19 ` [bug#50490] [PATCH 3/4] gnu: Add julia-ansicoloredprinters Efraim Flashner
2021-09-27 17:04   ` [bug#50490] [PATCH 0/5] Some julia packages zimoun
2021-09-14 18:19 ` [bug#50490] [PATCH 4/4] gnu: Add julia-documenter Efraim Flashner
2021-09-27 17:11   ` [bug#50490] [PATCH 0/5] Some julia packages zimoun
2021-09-30 11:18     ` Efraim Flashner

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=868rzi0xcl.fsf_-_@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=50490@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).