[Xapian-discuss] Mac OS X building...

Olly Betts olly at survex.com
Wed Sep 21 04:32:50 BST 2005


On Sun, Sep 18, 2005 at 03:36:39PM -0400, Chris McDonough wrote:
> Some Python setup code from the SciPy project does this:
> 
> if sys.platform=='darwin':
>      target = os.environ.get('MACOSX_DEPLOYMENT_TARGET', None)
>      if target is None:
>          target = '10.3'
>      major, minor = target.split('.')
>      if int(minor) < 3:
>          minor = '3'
>          warnings.warn('Environment variable '
>                      'MACOSX_DEPLOYMENT_TARGET reset to 10.3')
>      os.environ['MACOSX_DEPLOYMENT_TARGET'] = '%s.%s' % (major,
>                  minor)
> 
>      opt.extend(['-undefined', 'dynamic_lookup', '-bundle'])
> else:
>      opt.append("-shared")
> 
> Where "opts" are the linker flags, though as you say maybe that's  
> unnecessary.  I have no idea whether this is correct.  Given that  
> most folks are probably running either Panther (10.3) or Tiger (10.4)  
> nowadays, it would probably work for more people than it would not.

Sourceforge have a couple of OS X boxes, so I've just tried building the
Python bindings on OS X 10.1.4.  I can't get it to link with or without
MACOSX_DEPLOYMENT_TARGET set (or whatever I set it to).  The other box
was 10.2.8 last time I checked but it's currently down.  When it comes
back I'll check there too.  If that fails to link whatever
MACOSX_DEPLOYMENT_TARGET is set to, there's really no argument for not
setting MACOSX_DEPLOYMENT_TARGET.

Cheers,
    Olly



More information about the Xapian-discuss mailing list