From 09f012fb2e8d2357d5bfe91e33fbadce0cb345dc Mon Sep 17 00:00:00 2001 From: bryan newbold Date: Tue, 29 Jul 2008 02:34:19 -0400 Subject: helper files --- _find_fuse_parts.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 _find_fuse_parts.py (limited to '_find_fuse_parts.py') diff --git a/_find_fuse_parts.py b/_find_fuse_parts.py new file mode 100644 index 0000000..2a04ab3 --- /dev/null +++ b/_find_fuse_parts.py @@ -0,0 +1,22 @@ +import sys, os, glob +from os.path import realpath, dirname, join +from traceback import format_exception + +ddd = realpath(join(dirname(sys.argv[0]), '..')) + +for d in [ddd, '.']: + for p in glob.glob(join(d, 'build', 'lib.*')): + sys.path.insert(0, p) + +try: + import fuse +except ImportError: + raise RuntimeError, """ + +! Got exception: +""" + "".join([ "> " + x for x in format_exception(*sys.exc_info()) ]) + """ +! Have you ran `python setup.py build'? +! +! We've done our best to find the necessary components of the FUSE bindings +! even if it's not installed, we've got no clue what went wrong for you... +""" -- cgit v1.2.3