24 buildPythonPackage rec {
27 format = "setuptools";
29 disabled = pythonOlder "3.8";
32 inherit pname version;
33 hash = "sha256-SqB6xzS5wDe66vRK7GTskCrSR/V4EbWfMMTjHTHxJs8=";
56 packaging # uses packaging.version at runtime
60 # When doing `make distclean`, ignore docs
62 substituteInPlace Makefile --replace "src doc" "src"
63 # Force test suite to error when unittest runner fails
64 substituteInPlace tables/tests/test_suite.py \
65 --replace "return 0" "assert result.wasSuccessful(); return 0" \
66 --replace "return 1" "assert result.wasSuccessful(); return 1"
67 substituteInPlace requirements.txt \
68 --replace "cython>=0.29.21" "" \
69 --replace "blosc2~=2.0.0" "blosc2"
72 # Regenerate C code with Cython
78 "--hdf5=${lib.getDev hdf5}"
79 "--lzo=${lib.getDev lzo}"
80 "--bzip2=${lib.getDev bzip2}"
81 "--blosc=${lib.getDev c-blosc}"
82 "--blosc2=${lib.getDev blosc2.c-blosc2}"
85 nativeCheckInputs = [ pytest ];
88 export HOME=$(mktemp -d)
92 # Runs the light (yet comprehensive) subset of the test suite.
93 # The whole "heavy" test suite supposedly takes ~4 hours to run.
96 ${python.interpreter} -m tables.tests.test_all
100 pythonImportsCheck = [ "tables" ];
103 description = "Hierarchical datasets for Python";
104 homepage = "https://www.pytables.org/";
105 changelog = "https://github.com/PyTables/PyTables/releases/tag/v${version}";
106 license = licenses.bsd2;
107 maintainers = with maintainers; [ drewrisinger ];