<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
&gt; You are correct in the general case but not in this particular special case, and the Python and Perl extension mechanisms force the compiler for very good reasons.<br>
<br>
And MacPorts forces the compiler for very good reasons. The very specific problem that this Python decision causes for MacPorts has been demonstrated by users using Xcode 4.2 on Snow Leopard. Our Snow Leopard packages are built on a buildbot with Xcode 3.2.6 with gcc-4.2; Xcode 4.2 does not contain gcc-4.2. Therefore any users on Snow Leopard with Xcode 4.2 who receive our pre-compiled binary for Python will be unable to compile any modules because they will try to use gcc-4.2.<br>

</blockquote><div><br></div><div>Ok, but what does all that mean in practice now?</div><div><br></div><div>There is no gcc variant of python, and as argued in  a recent thread on the macports mailing list (<span style="font-family:Helvetica;white-space:nowrap"><a href="https://lists.macosforge.org/pipermail/macports-users/2013-June/032891.html">https://lists.macosforge.org/pipermail/macports-users/2013-June/032891.html</a>), this is not going to changed. Note that that previous</span></div>
<div><span style="font-family:Helvetica;white-space:nowrap">post describes exactly the same problem I run into: </span></div><div><span style="font-family:Helvetica;white-space:nowrap"><br></span></div><div><span style="font-family:Helvetica;white-space:nowrap">1.) python is built with Xcode, so all python extensions/modules should be compiled with the same compiler. Using another</span></div>
<div><span style="font-family:Helvetica;white-space:nowrap">compiler is not guaranteed to work, but usually does work (in fact, py-scipy is compiled using the macports gcc, unlike all other</span></div><div><span style="font-family:Helvetica;white-space:nowrap">python packages I looked at.) </span></div>
<div><span style="font-family:Helvetica;white-space:nowrap"><br></span></div><div><span style="font-family:Helvetica;white-space:nowrap">2.) When linking to some external library, one should best also use the same compiler as that library (especially when mixing C with</span></div>
<div><span style="font-family:Helvetica;white-space:nowrap">Fortran ...). But again, usually mixing different compilers does work, too.</span></div><div><span style="font-family:Helvetica;white-space:nowrap"><br></span></div>
<div><span style="font-family:Helvetica;white-space:nowrap">Now, in many instances 1) and 2) can&#39;t be fulfilled at the same time. So what&#39;s the lesser evil?</span></div><div><span style="font-family:Helvetica;white-space:nowrap"><br>
</span></div><div><span style="font-family:Helvetica;white-space:nowrap">Best,</span></div><div><span style="font-family:Helvetica;white-space:nowrap"><br></span></div><div><span style="font-family:Helvetica;white-space:nowrap">Michael<span></span></span></div>