From: Efraim Flashner <efraim@flashner.co.il>
To: 50490@debbugs.gnu.org
Cc: Efraim Flashner <efraim@flashner.co.il>
Subject: [bug#50490] [PATCH 4/5] gnu: Add julia-pycall.
Date: Wed, 22 Sep 2021 15:13:19 +0300 [thread overview]
Message-ID: <4c2974bdaa47fcb961ead03fe56c8b06ca9317cf.1631211286.git.efraim@flashner.co.il> (raw)
In-Reply-To: <cover.1631211286.git.efraim@flashner.co.il>
* 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)))
+
(define-public julia-quadgk
(package
(name "julia-quadgk")
--
2.33.0
next prev parent reply other threads:[~2021-09-22 12:18 UTC|newest]
Thread overview: 13+ 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 ` Efraim Flashner [this message]
2021-09-27 16:58 ` zimoun
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
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=4c2974bdaa47fcb961ead03fe56c8b06ca9317cf.1631211286.git.efraim@flashner.co.il \
--to=efraim@flashner.co.il \
--cc=50490@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.