From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id KOiZIysfS2GSCgEAgWs5BA (envelope-from ) for ; Wed, 22 Sep 2021 14:18:51 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id kL1bHysfS2FjGQAA1q6Kng (envelope-from ) for ; Wed, 22 Sep 2021 12:18:51 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5147D14997 for ; Wed, 22 Sep 2021 14:18:51 +0200 (CEST) Received: from localhost ([::1]:42498 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mT1D8-0005bZ-Bj for larch@yhetil.org; Wed, 22 Sep 2021 08:18:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38756) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mT1BP-0004QF-IW for guix-patches@gnu.org; Wed, 22 Sep 2021 08:17:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37474) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mT1BP-0004rj-AB for guix-patches@gnu.org; Wed, 22 Sep 2021 08:17:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mT1BP-0004ez-60 for guix-patches@gnu.org; Wed, 22 Sep 2021 08:17:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50490] [PATCH 4/5] gnu: Add julia-pycall. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 22 Sep 2021 12:17:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50490 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50490@debbugs.gnu.org Cc: Efraim Flashner Received: via spool by 50490-submit@debbugs.gnu.org id=B50490.163231301317878 (code B ref 50490); Wed, 22 Sep 2021 12:17:03 +0000 Received: (at 50490) by debbugs.gnu.org; 22 Sep 2021 12:16:53 +0000 Received: from localhost ([127.0.0.1]:49018 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mT1BE-0004eI-OQ for submit@debbugs.gnu.org; Wed, 22 Sep 2021 08:16:53 -0400 Received: from flashner.co.il ([178.62.234.194]:44590) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mT1BC-0004e3-Nf for 50490@debbugs.gnu.org; Wed, 22 Sep 2021 08:16:51 -0400 Received: from localhost (unknown [141.226.169.107]) by flashner.co.il (Postfix) with ESMTPSA id DD47E40313; Wed, 22 Sep 2021 12:16:44 +0000 (UTC) From: Efraim Flashner Date: Wed, 22 Sep 2021 15:13:19 +0300 Message-Id: <4c2974bdaa47fcb961ead03fe56c8b06ca9317cf.1631211286.git.efraim@flashner.co.il> X-Mailer: git-send-email 2.33.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1632313131; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=s1Po/uRtXtDHtPiGTcAIC0R74fi0V+2cIqjUKGVjwpE=; b=pd1XoyUV8DA4Xce/HCoep5VeaWaCibzM86MCCkRiDdS92Z8YG+EchfA/9qj+Wma8jUad6O cl6SZXJquFW3QVwcRd13ji6kdUAqUOXAniTEE9k8+1gSRvuHp1l6qrHiY0HheqA6vQ6C4B bridbEVzrdqVekNF7f86RHrYNPzLK7d+n5YL7/lvZBUZQBiPH4fugzSNSudtL7mpWaf6EU /rIv9/3olcjDlIxUJJyO6iM6u36TC47iZWwoZlz1S15YN8VHlGmAu9ygxUD3l9ECCZNzBz WsaeOkD7abAGkDPmWWBt4GtTWEI5b3k7plk522GqAubsptWOxTfeyzRTNFeYIw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632313131; a=rsa-sha256; cv=none; b=YL/U8RDrGbPDgQAp7JAwgRNDvvYP7iJ0/10bAKosbXeKBfGGNB5Xq3lqXWGzDmE2k6wpz6 u8fHXuNjQ2VW316WT1KG5n0+fylY6CMI+u4whT2KWyMk5vkH7iZ0U4m3CBWV7AfzSbioNJ AoRVY9aschbQRSJQJNCs6Mi2hwh79QYUg8KeT7Kh+mvZZJWE77ieHJVNgIPO+lIpZYLCe8 SGaUDXTXK00/3k3rNNy+BZiTdDD9aLXREmbGdSR2XF9BIAQstGfcw/je7UiVpj00Y3rn/u hyqWrUOg8krblFSkRU0KgjCcSO/uDV/VJWsDRKldCokZykFsgKm+TiIX+JrDow== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 4.11 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 5147D14997 X-Spam-Score: 4.11 X-Migadu-Scanner: scn0.migadu.com X-TUID: vgKnBypguPbJ * 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