lol

Merge pull request #10814 from NarrativeScience/no_large_file_test

numpy: patch to remove large file test

+41
+35
pkgs/development/python-modules/numpy-no-large-files.patch
··· 1 + --- numpy/lib/tests/test_format.py 2015-08-11 12:03:43.000000000 -0500 2 + +++ numpy/lib/tests/test_format_no_large_files.py 2015-11-03 16:03:30.328084827 -0600 3 + @@ -810,32 +810,5 @@ 4 + format.write_array_header_1_0(s, d) 5 + assert_raises(ValueError, format.read_array_header_1_0, s) 6 + 7 + - 8 + -def test_large_file_support(): 9 + - from nose import SkipTest 10 + - if (sys.platform == 'win32' or sys.platform == 'cygwin'): 11 + - raise SkipTest("Unknown if Windows has sparse filesystems") 12 + - # try creating a large sparse file 13 + - tf_name = os.path.join(tempdir, 'sparse_file') 14 + - try: 15 + - # seek past end would work too, but linux truncate somewhat 16 + - # increases the chances that we have a sparse filesystem and can 17 + - # avoid actually writing 5GB 18 + - import subprocess as sp 19 + - sp.check_call(["truncate", "-s", "5368709120", tf_name]) 20 + - except: 21 + - raise SkipTest("Could not create 5GB large file") 22 + - # write a small array to the end 23 + - with open(tf_name, "wb") as f: 24 + - f.seek(5368709120) 25 + - d = np.arange(5) 26 + - np.save(f, d) 27 + - # read it back 28 + - with open(tf_name, "rb") as f: 29 + - f.seek(5368709120) 30 + - r = np.load(f) 31 + - assert_array_equal(r, d) 32 + - 33 + - 34 + if __name__ == "__main__": 35 + run_module_suite()
+6
pkgs/top-level/python-packages.nix
··· 10455 10455 buildInputs = [ pkgs.gfortran self.nose ]; 10456 10456 propagatedBuildInputs = [ support.openblas ]; 10457 10457 10458 + # This patch removes the test of large file support, which takes forever 10459 + # and can cause the machine to run out of disk space when run. 10460 + patchPhase = '' 10461 + patch -p0 < ${../development/python-modules/numpy-no-large-files.patch} 10462 + ''; 10463 + 10458 10464 meta = { 10459 10465 description = "Scientific tools for Python"; 10460 10466 homepage = "http://numpy.scipy.org/";