This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lemburg
Recipients benjamin.peterson, lemburg, ned.deily, ronaldoussoren
Date 2010-06-22.17:46:32
SpamBayes Score 0.00016458704
Marked as misclassified No
Message-id <4C20F6F7.9070404@egenix.com>
In-reply-to <1277217134.08.0.516349664803.issue9046@psf.upfronthosting.co.za>
Content
Ronald Oussoren wrote:
> 
> Ronald Oussoren <ronaldoussoren@mac.com> added the comment:
> 
> What I don't quite understand is why the build fails for you but passes for me. What configure flags did you use?

I posted the configure options in the first message on this ticket.

The failure appears to be due to the fact that we run and install
our software in /usr/local (which is the standard we use on all
Unix systems).

> This version should fare better:
> 
> def is_macosx_sdk_path(path):
>     """
>     Returns True if 'path' can be located in an OSX SDK
>     """
>     return (path.startswith('/usr/') and not path.startswith('/usr/local')) or path.startswith('/System/')

With this variant, the build works correctly, however, see below...

> This explicitly tests for paths that must be in the SDK:
> 
> * Anything in /System is owned by the system, and should be fetched
>   through the SDK
> * Likewise for anything in /usr that isn't in /usr/local
>  
> IMHO anyone that installs additional libraries in /usr/lib, or /System/Libraries/Frameworks is confused at best, and we shouldn't even try to support that.

...wouldn't it be better to check whether the SDK does indeed provide
the path in question and only then redirect to the SDK path instead
of the normal system one ?

I'm not sure whether these will ever be needed by Python,
but it would certainly make the function more robust:

There are quite a few things in /usr/lib that you don't find in
the SDK usr/lib/ dir. For /System the situation is even more obvious:
the SDK version only has these entries:

# ls -l /Developer/SDKs/MacOSX10.4u.sdk/System/Library/
total 0
drwxr-xr-x     3 root  wheel   102 Oct 27  2007 CFMSupport
drwxr-xr-x    92 root  wheel  3128 Oct 27  2007 Frameworks
drwxr-xr-x     3 root  wheel   102 Oct 27  2007 Printers
drwxr-xr-x   123 root  wheel  4182 Oct 27  2007 PrivateFrameworks

whereas the OS directory has dozens of entries.

> The repository contains an simpler (but in hindsight too simple) version because ${SDKROOT}/usr/local/lib is a symlink to the real /usr/local/lib. That works fine when looking for libraries, but not when looking for other files (such as headers).

Right, but really only that link. SDK also doesn't contain any links
for the missing /System/Library directories.
History
Date User Action Args
2010-06-22 17:46:34lemburgsetrecipients: + lemburg, ronaldoussoren, benjamin.peterson, ned.deily
2010-06-22 17:46:33lemburglinkissue9046 messages
2010-06-22 17:46:32lemburgcreate