2021-01-24 00:29:22 +00:00
|
|
|
{ lib, fetchPypi, python, buildPythonPackage
|
2019-10-17 07:38:55 +01:00
|
|
|
, cython, bzip2, lzo, numpy, numexpr, hdf5, six, c-blosc, mock }:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2019-11-23 07:34:43 +00:00
|
|
|
version = "3.5.2";
|
2019-10-17 07:38:55 +01:00
|
|
|
pname = "tables";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-11-23 07:34:43 +00:00
|
|
|
sha256 = "1hikrki0hx94ass31pn0jyz9iy0zhnkjacfk86m21cxsc8if685j";
|
2019-10-17 07:38:55 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ hdf5 cython bzip2 lzo c-blosc ];
|
|
|
|
propagatedBuildInputs = [ numpy numexpr six mock ];
|
|
|
|
|
|
|
|
# The setup script complains about missing run-paths, but they are
|
|
|
|
# actually set.
|
|
|
|
setupPyBuildFlags = [
|
2021-01-24 00:29:22 +00:00
|
|
|
"--hdf5=${lib.getDev hdf5}"
|
|
|
|
"--lzo=${lib.getDev lzo}"
|
|
|
|
"--bzip2=${lib.getDev bzip2}"
|
|
|
|
"--blosc=${lib.getDev c-blosc}"
|
2019-10-17 07:38:55 +01: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 = ''
|
|
|
|
${python.interpreter} <<EOF
|
|
|
|
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;
|
|
|
|
|
2021-01-24 00:29:22 +00:00
|
|
|
meta = with lib; {
|
2019-10-17 07:38:55 +01:00
|
|
|
description = "Hierarchical datasets for Python";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://www.pytables.org/";
|
2021-01-24 00:29:22 +00:00
|
|
|
license = licenses.bsd2;
|
2019-10-17 07:38:55 +01:00
|
|
|
};
|
|
|
|
}
|