at v192 1.7 kB view raw
1{ stdenv, fetchurl, python, buildPythonPackage 2, cython, bzip2, lzo, numpy, numexpr, hdf5 }: 3 4buildPythonPackage rec { 5 version = "3.1.1"; 6 name = "tables-${version}"; 7 8 src = fetchurl { 9 url = "mirror://sourceforge/pytables/${name}.tar.gz"; 10 sha256 = "18rdzv9xwiapb5c8y47rk2fi3fdm2dpjf68wfycma67ifrih7f9r"; 11 }; 12 13 buildInputs = [ hdf5 cython bzip2 lzo ]; 14 propagatedBuildInputs = [ numpy numexpr ]; 15 16 # The setup script complains about missing run-paths, but they are 17 # actually set. 18 setupPyBuildFlags = 19 [ "--hdf5=${hdf5}" 20 "--lzo=${lzo}" 21 "--bzip2=${bzip2}" 22 ]; 23 setupPyInstallFlags = setupPyBuildFlags; 24 25 # Run the test suite. 26 # It requires the build path to be in the python search path. 27 # These tests take quite some time. 28 # If the hdf5 library is built with zlib then there is only one 29 # test-failure. That is the same failure as described in the following 30 # github issue: 31 # https://github.com/PyTables/PyTables/issues/269 32 checkPhase = '' 33 ${python}/bin/${python.executable} <<EOF 34 import sysconfig 35 import sys 36 import os 37 f = "lib.{platform}-{version[0]}.{version[1]}" 38 lib = f.format(platform=sysconfig.get_platform(), 39 version=sys.version_info) 40 build = os.path.join(os.getcwd(), 'build', lib) 41 sys.path.insert(0, build) 42 import tables 43 r = tables.test() 44 if not r.wasSuccessful(): 45 sys.exit(1) 46 EOF 47 ''; 48 49 # Disable tests until the failure described above is fixed. 50 doCheck = false; 51 52 meta = { 53 description = "Hierarchical datasets for Python"; 54 homepage = "http://www.pytables.org/"; 55 license = stdenv.lib.licenses.bsd2; 56 }; 57}