nixpkgs/pkgs/development/python-modules/tables/default.nix
merijnb f3288a2b8d pythonPackages.tables: 3.6.0 -> 3.6.1 (#72930)
The package has vanished from pypi, and only this new version is now
available. The release notes for the new version state:

```
Release 3.6.1
Maintenance release to fix packaging issues.
No new features or bug fixes.
```

so I can only assume that the 3.6.0 release was not working correctly.
2019-11-06 19:31:56 -05:00

71 lines
1.9 KiB
Nix

{ stdenv, lib, fetchPypi, python, buildPythonPackage, isPy38
, cython, bzip2, lzo, numpy, numexpr, hdf5, six, c-blosc, mock }:
with stdenv.lib;
buildPythonPackage rec {
version = "3.6.1";
pname = "tables";
src = fetchPypi {
inherit pname version;
sha256 = "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9";
};
nativeBuildInputs = [ cython ];
buildInputs = [ hdf5 bzip2 lzo c-blosc ];
propagatedBuildInputs = [ numpy numexpr six mock ];
# When doing `make distclean`, ignore docs
postPatch = ''
substituteInPlace Makefile --replace "src doc" "src"
'';
# Regenerate C code with Cython
preBuild = ''
make distclean
'';
# The setup script complains about missing run-paths, but they are
# actually set.
setupPyBuildFlags = [
"--hdf5=${getDev hdf5}"
"--lzo=${getDev lzo}"
"--bzip2=${getDev bzip2}"
"--blosc=${getDev c-blosc}"
];
# 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;
meta = {
description = "Hierarchical datasets for Python";
homepage = http://www.pytables.org/;
license = stdenv.lib.licenses.bsd2;
};
}