From 1e264b61d82b009778780926ca730b5dc990a635 Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Tue, 3 Nov 2009 10:00:57 +0200 Subject: [PATCH] spath: Allow importing even when not compiled. --- scikits/image/analysis/__init__.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scikits/image/analysis/__init__.py b/scikits/image/analysis/__init__.py index 65e7dc01..ab753358 100644 --- a/scikits/image/analysis/__init__.py +++ b/scikits/image/analysis/__init__.py @@ -1 +1,9 @@ -from spath import shortest_path +try: + from spath import shortest_path +except ImportError: + print """*** The shortest path extension has not been compiled. Run + +python setup.py build_ext -i + +in the source directory to build in-place. Please refer to INSTALL.txt +for further detail."""