2018-06-23 13:27:58 +00:00
|
|
|
{ stdenv, fetchPypi, python, buildPythonPackage
|
2017-05-06 08:45:34 +00:00
|
|
|
, cython, bzip2, lzo, numpy, numexpr, hdf5, six, c-blosc }:
|
2014-06-14 16:24:50 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2018-06-21 05:37:18 +00:00
|
|
|
version = "3.4.4";
|
2017-05-27 09:25:35 +00:00
|
|
|
pname = "tables";
|
2014-06-14 16:24:50 +00:00
|
|
|
|
2018-06-23 13:27:58 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-06-21 05:37:18 +00:00
|
|
|
sha256 = "bdc5c073712af2a43babd139c4855fc99496bb2c3f3f5d1b4770a985e6f9ce29";
|
2014-06-14 16:24:50 +00:00
|
|
|
};
|
|
|
|
|
2017-05-06 08:45:34 +00:00
|
|
|
buildInputs = [ hdf5 cython bzip2 lzo c-blosc ];
|
2017-02-16 16:05:10 +00:00
|
|
|
propagatedBuildInputs = [ numpy numexpr six ];
|
2014-06-14 16:24:50 +00:00
|
|
|
|
|
|
|
# The setup script complains about missing run-paths, but they are
|
|
|
|
# actually set.
|
|
|
|
setupPyBuildFlags =
|
|
|
|
[ "--hdf5=${hdf5}"
|
|
|
|
"--lzo=${lzo}"
|
2016-04-16 16:46:12 +00:00
|
|
|
"--bzip2=${bzip2.dev}"
|
2017-05-06 08:45:34 +00:00
|
|
|
"--blosc=${c-blosc}"
|
2014-06-14 16:24:50 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# Run the test suite.
|
|
|
|
# It requires the build path to be in the python search path.
|
|
|
|
# These tests take quite some time.
|
|
|
|
# If the hdf5 library is built with zlib then there is only one
|
|
|
|
# test-failure. That is the same failure as described in the following
|
|
|
|
# github issue:
|
|
|
|
# https://github.com/PyTables/PyTables/issues/269
|
|
|
|
checkPhase = ''
|
2018-06-23 13:27:58 +00:00
|
|
|
${python.interpreter} <<EOF
|
2014-06-14 16:24:50 +00:00
|
|
|
import sysconfig
|
|
|
|
import sys
|
|
|
|
import os
|
|
|
|
f = "lib.{platform}-{version[0]}.{version[1]}"
|
|
|
|
lib = f.format(platform=sysconfig.get_platform(),
|
|
|
|
version=sys.version_info)
|
|
|
|
build = os.path.join(os.getcwd(), 'build', lib)
|
|
|
|
sys.path.insert(0, build)
|
|
|
|
import tables
|
|
|
|
r = tables.test()
|
|
|
|
if not r.wasSuccessful():
|
|
|
|
sys.exit(1)
|
|
|
|
EOF
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Disable tests until the failure described above is fixed.
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Hierarchical datasets for Python";
|
2017-08-01 20:03:30 +00:00
|
|
|
homepage = http://www.pytables.org/;
|
2014-06-25 20:32:54 +00:00
|
|
|
license = stdenv.lib.licenses.bsd2;
|
2014-06-14 16:24:50 +00:00
|
|
|
};
|
|
|
|
}
|