[Distutils] [Pythonmac-SIG] pkg_resources and Mac OS X compatibility

Phillip J. Eby pje at telecommunity.com
Tue Feb 7 21:42:33 CET 2006

At 11:48 AM 2/7/2006 -0800, Bob Ippolito wrote:
>On Feb 7, 2006, at 5:37 AM, Phillip J. Eby wrote:
>>I've implemented a similar - but different - patch.  Yours causes
>>setuptools' tests to fail on non-Mac platforms, including non-Mac
>Could you explain how?  I don't see it.  The condition is::
>         if m is not None and sys.platform == "darwin":
>                 ...

Note that that's because I added the "darwin" check; it wasn't in your 
original patch.

>How does that fail on pure Darwin?  The condition should be False
>because m has to be None at that point and the branch shouldn't happen.

You're making the assumption that platform compatibility checks between Mac 
OS X version strings only happen when you're *running* on Mac OS X, but the 
test suite contains tests for the platform compatibility checking code that 
runs on all platforms.  Thus, the "m is not None" condition can apply 
regardless of platform, at least for test purposes.

More information about the Distutils-SIG mailing list