Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading libosxfuse_i32.dylib library #35

Closed
alexreg opened this issue Nov 26, 2014 · 2 comments
Closed

Loading libosxfuse_i32.dylib library #35

alexreg opened this issue Nov 26, 2014 · 2 comments

Comments

@alexreg
Copy link

alexreg commented Nov 26, 2014

It seems to be loading this library file regardless of which architecture the library is installed on. @bfleischer clarifies the issue here: osxfuse/osxfuse#183 (comment) (in particular it's related to the CloudFusion python app I was working with, though the problem resides in fusepy).

@posita
Copy link

posita commented Oct 10, 2015

Please consider the following patch to fuse.py as a work-around (from joe42/CloudFusion#28):

diff --git a/fuse.py b/fuse.py
index 7a03d61..8f14790 100644
--- a/fuse.py
+++ b/fuse.py
@@ -18,7 +18,7 @@ from __future__ import division
 from ctypes import *
 from ctypes.util import find_library
 from errno import *
-from os import strerror
+from os import environ, strerror
 from platform import machine, system
 from signal import signal, SIGINT, SIG_DFL
 from stat import S_IFDIR
@@ -65,6 +65,8 @@ if _system == 'Darwin':
 else:
     _libfuse_path = find_library('fuse')

+_libfuse_path = environ.get('LIBFUSE_PATH', _libfuse_path)
+
 if not _libfuse_path:
     raise EnvironmentError('Unable to find libfuse')
 else:

It allows one to explicitly override the path to libfuse by setting the LIBFUSE_PATH environment variable (e.g., if it is stored in a nonstandard location):

LIBFUSE_PATH=/path/to/libfuse.so python -c 'import fuse; ...'

I can submit a PR if desired.

@terencehonles
Copy link
Member

Thanks for your contribution this is a duplicate of #31 and was added in commit 4a2cb07

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants