From: Csaba H. <csa...@cr...> - 2008-07-30 07:13:33
|
Hi Bill, On Mon, Jul 28, 2008 at 04:26:30PM -0700, Bill Janssen wrote: > Here's a patch to setup.py to get fuse-python to work on > OS X 10.5 with Python 2.5. First of all, the patch you've sent is not properly formatted. All lines are left aligned, ie. left side indentation has been stripped somehow. Furthermore, I don't see why you need this, let me ask some questions. > --- orig-setup.py 2007-06-16 14:39:52.000000000 -0700 > +++ setup.py 2008-07-26 16:48:55.000000000 -0700 > @@ -46,8 +46,13 @@ > #if not os.environ.has_key('PKG_CONFIG_PATH'): > # os.environ['PKG_CONFIG_PATH'] = '/usr/local/lib/pkgconfig' > > +if sys.platform == 'darwin': > + # MacFUSE installs things in standard places > + cflags = "" > + libs = "-L/usr/local/lib -lfuse -liconv" > + > # Find fuse compiler/linker flag via pkgconfig > -if os.system('pkg-config --exists fuse 2> /dev/null') == 0: > +elif os.system('pkg-config --exists fuse 2> /dev/null') == 0: Usually everyone installs things in standard places :) -- unless there is a reason for not doing so. (Eg., you are using multiple versions of a software, or you are testing a development version which you don't want to install systemwise, etc.) The point in pkg-config is that it enables you to use the standard build instructions even if dependencies are not installed in a standard way. So pkg-config is preferred over hard-wired compiler options. Why can't you rely on it on OS X? Maybe MacFuse doesn't install a .pc file? If that's the case, do you have a clue why? > pkgcfg = os.popen('pkg-config --cflags fuse') > cflags = pkgcfg.readline().strip() > pkgcfg.close() > @@ -83,7 +88,7 @@ > # libraries=[] > # runtime_library_dirs=[] > # extra_objects, extra_compile_args, extra_link_args > -fusemodule = Extension('fuseparts._fusemodule', sources = > ['fuseparts/_fusemodule.c'], > +fusemodule = Extension('fuseparts._fuse', sources = > ['fuseparts/_fusemodule.c'], What's the purpose of this change? Regards, Csaba |