[PATCH] build both 32-bit and 64-bit native extensions on Mac OS X

Brendan Cully brendan at kublai.com
Tue Dec 20 11:21:46 CST 2011


On Tuesday, 20 December 2011 at 17:06, Steven Streeting wrote:
> I encountered this issue on 10.7 with Xcode 4.2 but while wanting to build Mercurial to be compatible with 32-bit architectures as well. So that's 10.6 or before since 10.7 requires x64. I set VERSIONER_PYTHON_VERSION=2.6 for this backwards compatibility (such a build then works on 10.6 or 10.7) but noticed that the extensions only had x64 compatibility.
> 
> So this change definitely works on 10.7, although I always use the standard Mac OS X version of Python, I'm not sure how you'd detect fink's version.

In this case I think the better patch is to allow ARCHFLAGS to be set
from the environment or build command line. You could attempt to
discover which archs are available in the python being used, but it
seems like more work for marginal benefit.

> > I don't have Xcode 4 on 10.6 to test (is it still possible to download
> > this?), but manually setting ARCHFLAGS breaks the build when python
> > doesn't support all the architectures (as is the case with at least
> > fink's python). So this patch will break mercurial on 10.7 with fink
> > python. If Xcode 4 on 10.6 is a supported configuration, then this
> > patch should ensure that it only sets ARCHFLAGS on 10.6.
> > 
> > Also see issue2879 and issue3120.
> 


More information about the Mercurial-devel mailing list