From 4ae40f9616160ff2bae54279200957c92ab9b791 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Thu, 6 Apr 2017 00:32:30 -0400 Subject: [PATCH 1/2] Require tifffile No matter what we need a copy of `tifffile` to process and convert TIFF data. We optionally used the vendored copy of `tifffile` from `scikit-image` previously as this might be an easier way for end users to meet this requirement as it was more generally available. As `tifffile` is available from `conda-forge` and we use that channel for basically all of our dependencies, it doesn't make sense to not use `tifffile` from there as well. This way we have a better chance of having the newest version of `tifffile` available. As `tifffile` is under the BSD 3-clause license, there are no additional constraints from what we already have with `scikit-image` and they are all quite reasonable. --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index f561241e..9abf58be 100644 --- a/setup.py +++ b/setup.py @@ -65,6 +65,7 @@ def run_tests(self): "xnumpy", "scikit-image", "scikit-learn", + "tifffile", "yail", "mahotas", "vigra", From 570f2ad257027dcdd10ef9415ae4e064226b3006 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Thu, 6 Apr 2017 09:48:42 -0400 Subject: [PATCH 2/2] Drop fallback to scikit-image's tifffile As we have now made tifffile a hard requirement, drop the fallback to scikit-image's vendored copy of tifffile. --- nanshe/io/xtiff.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/nanshe/io/xtiff.py b/nanshe/io/xtiff.py index 72eda7cb..2bc7d6fe 100644 --- a/nanshe/io/xtiff.py +++ b/nanshe/io/xtiff.py @@ -37,12 +37,7 @@ from nanshe.util import iters, xglob, prof, xnumpy from nanshe.io import hdf5 -try: - import tifffile -except ImportError: - # scikit-image is bundled with tifffile so use it. - from skimage.external import tifffile - +import tifffile from past.builtins import unicode