diff options
author | bryan newbold <bnewbold@snark.mit.edu> | 2008-07-29 02:34:19 -0400 |
---|---|---|
committer | bryan newbold <bnewbold@snark.mit.edu> | 2008-07-29 02:34:19 -0400 |
commit | 09f012fb2e8d2357d5bfe91e33fbadce0cb345dc (patch) | |
tree | c2c6d9faa3a72de94e8d32a7938c1d2990054f76 /_find_fuse_parts.py | |
parent | c56c18320506152db25277f49c05733c73a1043a (diff) | |
download | pynsfs-09f012fb2e8d2357d5bfe91e33fbadce0cb345dc.tar.gz pynsfs-09f012fb2e8d2357d5bfe91e33fbadce0cb345dc.zip |
helper files
Diffstat (limited to '_find_fuse_parts.py')
-rw-r--r-- | _find_fuse_parts.py | 22 |
1 files changed, 22 insertions, 0 deletions
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... +""" |