mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-02 08:13:05 +08:00
Import fail if python is runned with -OO
Hello, This fix a crash on skimage import if Python compilation optimization is set to 2 (Remove docstrings / Run python with -OO argument)
This commit is contained in:
@@ -10,6 +10,7 @@ from .collection import *
|
||||
|
||||
from ._io import *
|
||||
from ._image_stack import *
|
||||
import sys
|
||||
|
||||
|
||||
reset_plugins()
|
||||
@@ -58,5 +59,5 @@ def _update_doc(doc):
|
||||
|
||||
return doc
|
||||
|
||||
|
||||
__doc__ = _update_doc(__doc__)
|
||||
if sys.flags.optimize < 2:
|
||||
__doc__ = _update_doc(__doc__)
|
||||
|
||||
Reference in New Issue
Block a user