Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.03 58 lines 1.7 kB view raw
1{ stdenv, lib, fetchPypi, python, buildPythonPackage 2, cython, bzip2, lzo, numpy, numexpr, hdf5, six, c-blosc, mock }: 3 4with stdenv.lib; 5 6buildPythonPackage rec { 7 version = "3.5.2"; 8 pname = "tables"; 9 10 src = fetchPypi { 11 inherit pname version; 12 sha256 = "1hikrki0hx94ass31pn0jyz9iy0zhnkjacfk86m21cxsc8if685j"; 13 }; 14 15 buildInputs = [ hdf5 cython bzip2 lzo c-blosc ]; 16 propagatedBuildInputs = [ numpy numexpr six mock ]; 17 18 # The setup script complains about missing run-paths, but they are 19 # actually set. 20 setupPyBuildFlags = [ 21 "--hdf5=${getDev hdf5}" 22 "--lzo=${getDev lzo}" 23 "--bzip2=${getDev bzip2}" 24 "--blosc=${getDev c-blosc}" 25 ]; 26 # Run the test suite. 27 # It requires the build path to be in the python search path. 28 # These tests take quite some time. 29 # If the hdf5 library is built with zlib then there is only one 30 # test-failure. That is the same failure as described in the following 31 # github issue: 32 # https://github.com/PyTables/PyTables/issues/269 33 checkPhase = '' 34 ${python.interpreter} <<EOF 35 import sysconfig 36 import sys 37 import os 38 f = "lib.{platform}-{version[0]}.{version[1]}" 39 lib = f.format(platform=sysconfig.get_platform(), 40 version=sys.version_info) 41 build = os.path.join(os.getcwd(), 'build', lib) 42 sys.path.insert(0, build) 43 import tables 44 r = tables.test() 45 if not r.wasSuccessful(): 46 sys.exit(1) 47 EOF 48 ''; 49 50 # Disable tests until the failure described above is fixed. 51 doCheck = false; 52 53 meta = { 54 description = "Hierarchical datasets for Python"; 55 homepage = http://www.pytables.org/; 56 license = stdenv.lib.licenses.bsd2; 57 }; 58}