aboutsummaryrefslogtreecommitdiffstats
path: root/find_fuse_parts.py
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2011-04-29 16:00:17 -0400
committerbnewbold <bnewbold@robocracy.org>2011-04-29 16:00:17 -0400
commitfc80cc72b0e1900ea0e0dc540d6a52551e9b19c1 (patch)
tree3bada2c98e2e93ed09b861293ab78b4e035219fb /find_fuse_parts.py
parentfba9ce54b4cfbcc8b2847ea1cc22144ba79957b0 (diff)
downloadpynsfs-fc80cc72b0e1900ea0e0dc540d6a52551e9b19c1.tar.gz
pynsfs-fc80cc72b0e1900ea0e0dc540d6a52551e9b19c1.zip
minor repo cleanupHEADmaster
Diffstat (limited to 'find_fuse_parts.py')
-rw-r--r--find_fuse_parts.py22
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...
+"""