From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60222) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCLit-0006Rh-MI for guix-patches@gnu.org; Tue, 16 Oct 2018 05:33:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gCLip-0004Rf-3N for guix-patches@gnu.org; Tue, 16 Oct 2018 05:33:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:47567) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gCLio-0004RZ-VL for guix-patches@gnu.org; Tue, 16 Oct 2018 05:33:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gCLio-0003Jf-R4 for guix-patches@gnu.org; Tue, 16 Oct 2018 05:33:02 -0400 Subject: [bug#33059] [PATCH 02/10] gnu: Add python-petsc4py. Resent-Message-ID: From: Paul Garlick Date: Tue, 16 Oct 2018 10:31:16 +0100 Message-Id: <1539682284-6446-2-git-send-email-pgarlick@tourbillion-technology.com> In-Reply-To: <1539682284-6446-1-git-send-email-pgarlick@tourbillion-technology.com> References: <1539682284-6446-1-git-send-email-pgarlick@tourbillion-technology.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 33059@debbugs.gnu.org Cc: Paul Garlick * gnu/packages/simulation.scm (python-petsc4py): New variable. --- gnu/packages/simulation.scm | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm index 857d856..3f6b73f 100644 --- a/gnu/packages/simulation.scm +++ b/gnu/packages/simulation.scm @@ -35,6 +35,7 @@ #:use-module (gnu packages mpi) #:use-module (gnu packages multiprecision) #:use-module (gnu packages ncurses) + #:use-module (gnu packages python) #:use-module (gnu packages readline) #:use-module (gnu packages ssh) #:use-module (gnu packages tls) @@ -264,3 +265,40 @@ supports point-to-point and collective communications of any picklable Python object as well as optimized communications of Python objects (such as NumPy arrays) that expose a buffer interface.") (license license:bsd-3))) + +(define-public python-petsc4py + (package + (name "python-petsc4py") + (version "3.9.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "petsc4py" version)) + (sha256 + (base32 + "1f8zd1ac9irsgkyqmzq30d9kl10fy1nh6zk312dhs43g449fkkhc")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'build 'pre-build + (lambda _ + ;; Define path to PETSc installation. + (setenv "PETSC_DIR" (assoc-ref %build-inputs "petsc")) + #t)) + (add-before 'check 'mpi-setup + ,%openmpi-setup)))) + (inputs + `(("petsc" ,petsc-openmpi) + ("python-numpy" ,python-numpy))) + (home-page + "https://bitbucket.org/petsc/petsc4py/") + (synopsis "Python bindings for PETSc") + (description "PETSc, the Portable, Extensible Toolkit for +Scientific Computation, is a suite of data structures and routines for +the scalable (parallel) solution of scientific applications modeled by +partial differential equations. It employs the MPI standard for all +message-passing communication. @code{petsc4py} provides Python +bindings to almost all functions of PETSc.") + (license license:bsd-3))) + -- 1.8.3.1