From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: [PATCH] Fix h5py. Date: Thu, 8 Oct 2015 13:49:52 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35495) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zk9i0-0007Nn-7s for guix-devel@gnu.org; Thu, 08 Oct 2015 07:50:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zk9hw-0005dT-3B for guix-devel@gnu.org; Thu, 08 Oct 2015 07:50:04 -0400 Received: from pegasus.bbbm.mdc-berlin.de ([141.80.25.20]:57018) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zk9hv-0005dN-OO for guix-devel@gnu.org; Thu, 08 Oct 2015 07:50:00 -0400 Received: from localhost (localhost [127.0.0.1]) by pegasus.bbbm.mdc-berlin.de (Postfix) with ESMTP id C3EA0380EC4 for ; Thu, 8 Oct 2015 13:49:58 +0200 (CEST) Received: from pegasus.bbbm.mdc-berlin.de ([127.0.0.1]) by localhost (pegasus.bbbm.mdc-berlin.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BY1jE_KBQ-RR for ; Thu, 8 Oct 2015 13:49:52 +0200 (CEST) Received: from HTCAONE.mdc-berlin.net (mab.citx.mdc-berlin.de [141.80.36.102]) by pegasus.bbbm.mdc-berlin.de (Postfix) with ESMTP for ; Thu, 8 Oct 2015 13:49:52 +0200 (CEST) In-Reply-To: List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Guix-devel --=-=-= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable > Another problem with h5py was that it didn=E2=80=99t actually build aga= inst our > hdf5 library, because it looked for the library and the headers under > =E2=80=98/opt/local=E2=80=99 and =E2=80=98/usr/local=E2=80=99. I fixed= this by adding an additional > build phase. ... and that=E2=80=99s done in this patch: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename="0002-gnu-python-h5py-Fix-path-to-hdf5-library.patch" >From 9a503dbcda17186161d040531b06a0e7cf9b2a0f Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 8 Oct 2015 13:34:11 +0200 Subject: [PATCH 2/2] gnu: python-h5py: Fix path to hdf5 library. * gnu/packages/python.scm (python-h5py)[arguments]: Add "fix-hdf5-paths" phase. --- gnu/packages/python.scm | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 1865477..cdf0207 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -596,13 +596,28 @@ and verifies that it matches the intended target hostname.") (base32 "0q4f9l8grf6pwp64xbv8bmyxx416s7h4522nnxac056ap3savbps")))) (build-system python-build-system) + (arguments + `(#:tests? #f ; no test target + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-hdf5-paths + (lambda* (#:key inputs #:allow-other-keys) + (let ((prefix (assoc-ref inputs "hdf5"))) + (substitute* "setup_build.py" + (("\\['/opt/local/lib', '/usr/local/lib'\\]") + (string-append "['" prefix "/lib" "']")) + (("'/opt/local/include', '/usr/local/include'") + (string-append "'" prefix "/include" "'"))) + (substitute* "setup_configure.py" + (("\\['/usr/local/lib', '/opt/local/lib'\\]") + (string-append "['" prefix "/lib" "']"))) + #t)))))) (propagated-inputs `(("python-numpy" ,python-numpy))) (inputs `(("hdf5" ,hdf5))) (native-inputs `(("python-cython" ,python-cython))) - (arguments `(#:tests? #f)) ; no test target (home-page "http://www.h5py.org/") (synopsis "Read and write HDF5 files from Python") (description -- 2.1.0 --=-=-=--