[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/08: gnu: Add julia-pycall.
From: |
guix-commits |
Subject: |
04/08: gnu: Add julia-pycall. |
Date: |
Thu, 30 Sep 2021 07:26:20 -0400 (EDT) |
efraim pushed a commit to branch master
in repository guix.
commit 3893f1366990e0f5a30b143df56e862d7cc40b06
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Thu Sep 9 20:08:29 2021 +0300
gnu: Add julia-pycall.
* 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 1b738a9..16d0d71 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")
- branch master updated (b28cd88 -> 7b59508), guix-commits, 2021/09/30
- 01/08: gnu: Add julia-quadgk., guix-commits, 2021/09/30
- 04/08: gnu: Add julia-pycall.,
guix-commits <=
- 03/08: gnu: Add julia-mlstyle., guix-commits, 2021/09/30
- 05/08: gnu: Add julia-ansicoloredprinters., guix-commits, 2021/09/30
- 02/08: gnu: Add julia-measurements., guix-commits, 2021/09/30
- 06/08: gnu: Add julia-libsass-jll., guix-commits, 2021/09/30
- 08/08: gnu: Add julia-documenter., guix-commits, 2021/09/30
- 07/08: gnu: Add julia-sass., guix-commits, 2021/09/30