From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: [PATCH] Fix h5py. Date: Thu, 8 Oct 2015 13:44:44 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56182) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zk9d4-0006X8-Px for guix-devel@gnu.org; Thu, 08 Oct 2015 07:45:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zk9d0-0001Eu-Lc for guix-devel@gnu.org; Thu, 08 Oct 2015 07:44:58 -0400 Received: from sinope.bbbm.mdc-berlin.de ([141.80.25.23]:33689) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zk9d0-0001EO-8G for guix-devel@gnu.org; Thu, 08 Oct 2015 07:44:54 -0400 Received: from localhost (localhost [127.0.0.1]) by sinope.bbbm.mdc-berlin.de (Postfix) with ESMTP id 41027280906 for ; Thu, 8 Oct 2015 13:44:52 +0200 (CEST) Received: from sinope.bbbm.mdc-berlin.de ([127.0.0.1]) by localhost (sinope.bbbm.mdc-berlin.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jL8MqIySehtm for ; Thu, 8 Oct 2015 13:44:45 +0200 (CEST) Received: from HTCAONE.mdc-berlin.net (mab.citx.mdc-berlin.de [141.80.36.102]) by sinope.bbbm.mdc-berlin.de (Postfix) with ESMTP for ; Thu, 8 Oct 2015 13:44:45 +0200 (CEST) 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 Hi Guix, python-h5py is currently broken. guix environment --ad-hoc python-2.7.10 python2-h5py python >>> import h5py [weird error] The immediate reason here is that an Egg archive is built and installed instead of a directory. Python doesn=E2=80=99t seem to know how to impor= t modules whose contents are trapped in an Egg archive (or is this only the case when setuptools are not in the profile?). I found that removing =E2=80=98python-setuptools=E2=80=99 from the =E2=80= =98native-inputs=E2=80=99 field changes the behaviour such that no Egg archive is built and the library files are installed plainly. Another problem with h5py was that it didn=E2=80=99t actually build again= st 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 t= his by adding an additional build phase. The commit message is a little ugly, but I think it is correct. I=E2=80=99= m not a Pythonista but it seems that python-h5py now works fine (at least there are no weird error messages anymore). ~~ Ricardo --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename="0001-gnu-python-h5py-python2-h5py-Correct-inputs.patch" >From 5f368af582d3586a7b4e3a353d9bbd75eeb83a61 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 8 Oct 2015 13:30:23 +0200 Subject: [PATCH 1/2] gnu: python-h5py, python2-h5py: Correct inputs. * gnu/packages/python.scm (python-h5py) [inputs]: Remove python-cython and python-numpy. [propagated-inputs]: New field. [native-inputs]: Drop python-setuptools and add python-cython. (python2-h5py): Replace "inputs" with "propagated-inputs". --- gnu/packages/python.scm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 46fcb4a..1865477 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -596,12 +596,12 @@ and verifies that it matches the intended target hostname.") (base32 "0q4f9l8grf6pwp64xbv8bmyxx416s7h4522nnxac056ap3savbps")))) (build-system python-build-system) + (propagated-inputs + `(("python-numpy" ,python-numpy))) (inputs - `(("python-cython" ,python-cython) - ("python-numpy" ,python-numpy) - ("hdf5" ,hdf5))) + `(("hdf5" ,hdf5))) (native-inputs - `(("python-setuptools" ,python-setuptools))) + `(("python-cython" ,python-cython))) (arguments `(#:tests? #f)) ; no test target (home-page "http://www.h5py.org/") (synopsis "Read and write HDF5 files from Python") @@ -616,11 +616,11 @@ concepts.") (define-public python2-h5py (let ((h5py (package-with-python2 python-h5py))) (package (inherit h5py) - (inputs + (propagated-inputs `(("python2-numpy" ,python2-numpy) ,@(alist-delete "python-numpy" - (package-inputs h5py))))))) + (package-propagated-inputs h5py))))))) (define-public python-lockfile (package -- 2.1.0 --=-=-=--