2014-06-14 20:24:50 +04:00
|
|
|
{ stdenv, fetchurl, python, buildPythonPackage
|
|
|
|
, cython, bzip2, lzo, numpy, numexpr, hdf5 }:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2015-10-22 17:51:53 +03:00
|
|
|
version = "3.2.2";
|
2014-06-14 20:24:50 +04:00
|
|
|
name = "tables-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2016-04-26 15:38:03 +03:00
|
|
|
url = "mirror://pypi/t/tables/${name}.tar.gz";
|
2015-10-22 17:51:53 +03:00
|
|
|
sha256 = "3564b351a71ec1737b503b001eb7ceae1f65d5d6e3ffe1ea75aafba10f37fa84";
|
2014-06-14 20:24:50 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ hdf5 cython bzip2 lzo ];
|
|
|
|
propagatedBuildInputs = [ numpy numexpr ];
|
|
|
|
|
|
|
|
# The setup script complains about missing run-paths, but they are
|
|
|
|
# actually set.
|
|
|
|
setupPyBuildFlags =
|
|
|
|
[ "--hdf5=${hdf5}"
|
|
|
|
"--lzo=${lzo}"
|
2016-04-16 19:46:12 +03:00
|
|
|
"--bzip2=${bzip2.dev}"
|
2014-06-14 20:24:50 +04: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}/bin/${python.executable} <<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;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Hierarchical datasets for Python";
|
|
|
|
homepage = "http://www.pytables.org/";
|
2014-06-26 00:32:54 +04:00
|
|
|
license = stdenv.lib.licenses.bsd2;
|
2014-06-14 20:24:50 +04:00
|
|
|
};
|
|
|
|
}
|