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