mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-30 01:23:23 +08:00
Merge pull request #801 from stefanv/six_external
Make six an external dependency.
This commit is contained in:
@@ -22,6 +22,7 @@ install:
|
||||
- if [[ $PYVER == '2.7' ]]; then sudo apt-get install $PYTHON-matplotlib; fi
|
||||
- if [[ $PYVER == '3.2' ]]; then sudo pip-$PYVER install git+git://github.com/matplotlib/matplotlib.git@v1.2.x; fi
|
||||
- sudo pip-$PYVER install flake8
|
||||
- sudo pip-$PYVER install six
|
||||
- $PYTHON setup.py build
|
||||
- sudo $PYTHON setup.py install
|
||||
script:
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
cython>=0.17
|
||||
matplotlib>=1.0
|
||||
numpy>=1.6
|
||||
six>=1.3.0
|
||||
|
||||
@@ -22,6 +22,7 @@ PYTHON_VERSION = (2, 5)
|
||||
DEPENDENCIES = {
|
||||
'numpy': (1, 6),
|
||||
'Cython': (0, 17),
|
||||
'six': (1, 3),
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import warnings
|
||||
import functools
|
||||
import sys
|
||||
|
||||
from . import six
|
||||
import six
|
||||
|
||||
|
||||
__all__ = ['deprecated', 'get_bound_method_class']
|
||||
|
||||
@@ -4,11 +4,12 @@ import itertools
|
||||
import numpy as np
|
||||
|
||||
from skimage import img_as_float
|
||||
from skimage._shared import six
|
||||
from skimage._shared.six.moves import zip
|
||||
from .colorconv import rgb2gray, gray2rgb
|
||||
from . import rgb_colors
|
||||
|
||||
import six
|
||||
from six.moves import zip
|
||||
|
||||
|
||||
__all__ = ['color_dict', 'label2rgb', 'DEFAULT_COLORS']
|
||||
|
||||
|
||||
+2
-1
@@ -12,10 +12,11 @@ import tempfile
|
||||
from io import BytesIO
|
||||
|
||||
import numpy as np
|
||||
import six
|
||||
|
||||
from skimage.io._plugins import call as call_plugin
|
||||
from skimage.color import rgb2grey
|
||||
from skimage._shared import six
|
||||
|
||||
|
||||
|
||||
# Shared image queue
|
||||
|
||||
@@ -11,7 +11,7 @@ except ImportError:
|
||||
|
||||
from skimage.util import img_as_ubyte
|
||||
|
||||
from skimage._shared import six
|
||||
from six import string_types
|
||||
|
||||
|
||||
def imread(fname, dtype=None):
|
||||
@@ -106,7 +106,7 @@ def imsave(fname, arr, format_str=None):
|
||||
arr = arr.astype(np.uint8)
|
||||
|
||||
# default to PNG if file-like object
|
||||
if not isinstance(fname, six.string_types) and format_str is None:
|
||||
if not isinstance(fname, string_types) and format_str is None:
|
||||
format_str = "PNG"
|
||||
|
||||
img = Image.fromstring(mode, (arr.shape[1], arr.shape[0]), arr.tostring())
|
||||
|
||||
@@ -10,7 +10,8 @@ from copy import copy
|
||||
|
||||
import numpy as np
|
||||
from ._io import imread
|
||||
from .._shared import six
|
||||
|
||||
import six
|
||||
|
||||
|
||||
def concatenate_images(ic):
|
||||
|
||||
@@ -12,7 +12,8 @@ from skimage import data_dir
|
||||
from skimage.io import ImageCollection, MultiImage
|
||||
from skimage.io.collection import alphanumeric_key
|
||||
from skimage.io import Image as ioImage
|
||||
from skimage._shared import six
|
||||
|
||||
import six
|
||||
|
||||
|
||||
try:
|
||||
|
||||
@@ -8,7 +8,8 @@ from tempfile import NamedTemporaryFile
|
||||
from skimage import data_dir
|
||||
from skimage.io import (imread, imsave, use_plugin, reset_plugins,
|
||||
Image as ioImage)
|
||||
from skimage._shared.six import BytesIO
|
||||
|
||||
from six import BytesIO
|
||||
|
||||
|
||||
try:
|
||||
|
||||
@@ -7,8 +7,8 @@ from skimage import io
|
||||
from skimage import img_as_ubyte
|
||||
from skimage.transform import resize
|
||||
from skimage.color import color_dict
|
||||
from skimage._shared import six
|
||||
|
||||
import six
|
||||
|
||||
# Convert colors from `skimage.color` to uint8 and allow access through
|
||||
# dict or a named tuple.
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import six
|
||||
import math
|
||||
import numpy as np
|
||||
from scipy import ndimage, spatial
|
||||
from skimage.util import img_as_float
|
||||
from ._warps_cy import _warp_fast
|
||||
|
||||
from skimage._shared.utils import get_bound_method_class
|
||||
from skimage._shared import six
|
||||
from skimage.util import img_as_float
|
||||
from ._warps_cy import _warp_fast
|
||||
|
||||
|
||||
class GeometricTransform(object):
|
||||
|
||||
@@ -4,8 +4,8 @@ of an n-dimensional array.
|
||||
|
||||
"""
|
||||
from __future__ import division, absolute_import, print_function
|
||||
from skimage._shared.six import integer_types
|
||||
|
||||
from six import integer_types
|
||||
import numpy as np
|
||||
|
||||
try:
|
||||
|
||||
@@ -3,7 +3,8 @@ from warnings import warn
|
||||
from skimage.util.dtype import dtype_range
|
||||
from .base import Plugin
|
||||
from ..utils import ClearColormap, update_axes_image
|
||||
from skimage._shared import six
|
||||
|
||||
import six
|
||||
|
||||
|
||||
__all__ = ['OverlayPlugin']
|
||||
|
||||
Reference in New Issue
Block a user