diff options
Diffstat (limited to 'sci-biology')
-rwxr-xr-x | sci-biology/nilearn/files/0.4.1-bundled_joblib_test.patch | 39 | ||||
-rw-r--r-- | sci-biology/nilearn/nilearn-0.4.1.ebuild | 6 | ||||
-rw-r--r-- | sci-biology/nilearn/nilearn-0.4.2.ebuild | 6 | ||||
-rw-r--r-- | sci-biology/nilearn/nilearn-9999.ebuild | 6 |
4 files changed, 51 insertions, 6 deletions
diff --git a/sci-biology/nilearn/files/0.4.1-bundled_joblib_test.patch b/sci-biology/nilearn/files/0.4.1-bundled_joblib_test.patch new file mode 100755 index 000000000..e229d25fb --- /dev/null +++ b/sci-biology/nilearn/files/0.4.1-bundled_joblib_test.patch @@ -0,0 +1,39 @@ +--- a/nilearn/input_data/tests/test_nifti_masker.py 2018-08-02 18:57:07.700111595 +0200 ++++ b/nilearn/input_data/tests/test_nifti_masker.py 2018-08-02 18:57:29.453556439 +0200 +@@ -219,36 +219,6 @@ + assert_raises(ValueError, masker.fit_transform, data_img) + + +-def test_joblib_cache(): +- from sklearn.externals.joblib import hash, Memory +- mask = np.zeros((40, 40, 40)) +- mask[20, 20, 20] = 1 +- mask_img = Nifti1Image(mask, np.eye(4)) +- +- with testing.write_tmp_imgs(mask_img, create_files=True) as filename: +- masker = NiftiMasker(mask_img=filename) +- masker.fit() +- mask_hash = hash(masker.mask_img_) +- masker.mask_img_.get_data() +- assert_true(mask_hash == hash(masker.mask_img_)) +- +- # Test a tricky issue with memmapped joblib.memory that makes +- # imgs return by inverse_transform impossible to save +- cachedir = mkdtemp() +- try: +- masker.memory = Memory(cachedir=cachedir, mmap_mode='r', +- verbose=0) +- X = masker.transform(mask_img) +- # inverse_transform a first time, so that the result is cached +- out_img = masker.inverse_transform(X) +- out_img = masker.inverse_transform(X) +- out_img.to_filename(os.path.join(cachedir, 'test.nii')) +- finally: +- # enables to delete "filename" on windows +- del masker +- shutil.rmtree(cachedir, ignore_errors=True) +- +- + def test_mask_init_errors(): + # Errors that are caught in init + mask = NiftiMasker(mask_strategy='oops') diff --git a/sci-biology/nilearn/nilearn-0.4.1.ebuild b/sci-biology/nilearn/nilearn-0.4.1.ebuild index 87226eec3..80d3e2910 100644 --- a/sci-biology/nilearn/nilearn-0.4.1.ebuild +++ b/sci-biology/nilearn/nilearn-0.4.1.ebuild @@ -31,9 +31,11 @@ RDEPEND=" sci-libs/nibabel[${PYTHON_USEDEP}] plot? ( dev-python/matplotlib[${PYTHON_USEDEP}] )" -# upstream is reluctant to *not* depend on bundled scikits_learn: -# https://github.com/nilearn/nilearn/pull/1398 +PATCHES=( "${FILESDIR}/${PV}-bundled_joblib_test.patch" ) + python_prepare_all() { + # upstream is reluctant to *not* depend on bundled scikits_learn: + # https://github.com/nilearn/nilearn/pull/1398 local f for f in nilearn/{*/*/,*/,}*.py; do sed -r \ diff --git a/sci-biology/nilearn/nilearn-0.4.2.ebuild b/sci-biology/nilearn/nilearn-0.4.2.ebuild index 87226eec3..4b4d429bb 100644 --- a/sci-biology/nilearn/nilearn-0.4.2.ebuild +++ b/sci-biology/nilearn/nilearn-0.4.2.ebuild @@ -31,9 +31,11 @@ RDEPEND=" sci-libs/nibabel[${PYTHON_USEDEP}] plot? ( dev-python/matplotlib[${PYTHON_USEDEP}] )" -# upstream is reluctant to *not* depend on bundled scikits_learn: -# https://github.com/nilearn/nilearn/pull/1398 +PATCHES=( "${FILESDIR}/0.4.1-bundled_joblib_test.patch" ) + python_prepare_all() { + # upstream is reluctant to *not* depend on bundled scikits_learn: + # https://github.com/nilearn/nilearn/pull/1398 local f for f in nilearn/{*/*/,*/,}*.py; do sed -r \ diff --git a/sci-biology/nilearn/nilearn-9999.ebuild b/sci-biology/nilearn/nilearn-9999.ebuild index 460dfc74f..345f604b4 100644 --- a/sci-biology/nilearn/nilearn-9999.ebuild +++ b/sci-biology/nilearn/nilearn-9999.ebuild @@ -32,9 +32,11 @@ RDEPEND=" sci-libs/nibabel[${PYTHON_USEDEP}] plot? ( dev-python/matplotlib[${PYTHON_USEDEP}] )" -# upstream is reluctant to *not* depend on bundled scikits_learn: -# https://github.com/nilearn/nilearn/pull/1398 +PATCHES=( "${FILESDIR}/0.4.1-bundled_joblib_test.patch" ) + python_prepare_all() { + # upstream is reluctant to *not* depend on bundled scikits_learn: + # https://github.com/nilearn/nilearn/pull/1398 local f for f in nilearn/{*/*/,*/,}*.py; do sed -r \ |