1{ stdenv, fetchPypi, python, buildPythonPackage
2, cython, bzip2, lzo, numpy, numexpr, hdf5, six, c-blosc }:
3
4buildPythonPackage rec {
5 version = "3.4.4";
6 pname = "tables";
7
8 src = fetchPypi {
9 inherit pname version;
10 sha256 = "bdc5c073712af2a43babd139c4855fc99496bb2c3f3f5d1b4770a985e6f9ce29";
11 };
12
13 buildInputs = [ hdf5 cython bzip2 lzo c-blosc ];
14 propagatedBuildInputs = [ numpy numexpr six ];
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.dev}"
22 "--blosc=${c-blosc}"
23 ];
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.interpreter} <<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}