mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-06 13:30:21 +08:00
Merge Andy's plugin cleanups require to build the Debian package.
This commit is contained in:
@@ -8,19 +8,20 @@ from _plugins import use as use_plugin
|
||||
from _plugins import available as plugins
|
||||
from _plugins import info as plugin_info
|
||||
|
||||
# Add this plugin so that we can read images by default
|
||||
use_plugin('null')
|
||||
available_plugins = plugins()
|
||||
|
||||
try:
|
||||
use_plugin('pil')
|
||||
except ImportError:
|
||||
pass
|
||||
for preferred_plugin in ['pil',
|
||||
'matplotlib', 'gtk', 'freeimage', 'qt', 'null']:
|
||||
if preferred_plugin in available_plugins:
|
||||
use_plugin(preferred_plugin)
|
||||
break
|
||||
|
||||
from sift import *
|
||||
from collection import *
|
||||
|
||||
from io import *
|
||||
|
||||
|
||||
def _update_doc(doc):
|
||||
"""Add a list of plugins to the module docstring, formatted as
|
||||
a ReStructuredText table.
|
||||
@@ -38,7 +39,7 @@ def _update_doc(doc):
|
||||
info.insert(0, ('=' * col_1_len, {'description': '=' * col_2_len}))
|
||||
info.insert(1, ('Plugin', {'description': 'Description'}))
|
||||
info.insert(2, ('-' * col_1_len, {'description': '-' * col_2_len}))
|
||||
info.append( ('=' * col_1_len, {'description': '=' * col_2_len}))
|
||||
info.append(('=' * col_1_len, {'description': '=' * col_2_len}))
|
||||
|
||||
for (name, meta_data) in info:
|
||||
wrapped_descr = wrap(meta_data.get('description', ''),
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
[null]
|
||||
description = Default plugin that does nothing
|
||||
provides = imshow, _app_show
|
||||
provides = imshow, imread, _app_show
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
__all__ = ['imshow', '_app_show']
|
||||
__all__ = ['imshow', 'imread', '_app_show']
|
||||
|
||||
import warnings
|
||||
|
||||
@@ -9,7 +9,12 @@ scikits.image.io.plugins()
|
||||
|
||||
for a list of available plugins.'''
|
||||
|
||||
|
||||
def imshow(*args, **kwargs):
|
||||
warnings.warn(RuntimeWarning(message))
|
||||
|
||||
|
||||
def imread(*args, **kwargs):
|
||||
warnings.warn(RuntimeWarning(message))
|
||||
|
||||
_app_show = imshow
|
||||
|
||||
Reference in New Issue
Block a user