<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Brining back to dev list; seems like the right place.</div><div class="gmail_quote"><br></div><div class="gmail_quote">On Thu, Mar 20, 2014 at 4:01 PM, Sean Farley <span dir="ltr">&lt;<a href="mailto:sean@macports.org" target="_blank">sean@macports.org</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><br>
Adam Mercer &lt;<a href="mailto:ram@macports.org" target="_blank">ram@macports.org</a>&gt; writes:<br>
<br>
&gt; On Thu, Mar 20, 2014 at 2:55 PM, Sean Farley &lt;<a href="mailto:sean@macports.org" target="_blank">sean@macports.org</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; I tend to agree with you but need help seeing how this worked<br>
&gt;&gt; before. What path did automake pick up before this change?<br>
&gt;<br>
&gt; If you look at the patch you can see the original paths:<br>
&gt;<br>
&gt; &lt;<a href="http://trac.macports.org/browser/trunk/dports/devel/automake/files/patch-m4-python.m4.diff" target="_blank">http://trac.macports.org/browser/trunk/dports/devel/automake/files/patch-m4-python.m4.diff</a>&gt;<br>


&gt;<br>
&gt; The original paths are:<br>
&gt;<br>
&gt; AC_SUBST([PYTHON_PREFIX], [&#39;${prefix}&#39;])<br>
&gt; AC_SUBST([PYTHON_EXEC_PREFIX], [&#39;${exec_prefix}&#39;])<br>
&gt;<br>
&gt; Just to clarify this isn&#39;t the MacPorts prefix but the prefix for the<br>
&gt; running configure process.<br>
<br>
</div>Right, sorry, I meant more along the lines of:<br>
<br>
Before: my project installed into /path/foo/a<br>
After:  my project installed into /path/foo/b</blockquote><div><br></div><div>I think the issue here is that automake is getting patched to *only* support MacPorts-managed builds, but really automake should still be available for use to build non-MP software.</div>
<div><br></div><div>What was broken that needed fixing (by the original change)? Is there a particular port that needed the change? Is there another way to fix it without modifying automake?</div><div><br></div><div>Assuming the change is/was needed (and the best solution), perhaps setting an environment variable during MP managed builds could be used here to switch the behavior? Something along the lines of:</div>

<br>AC_SUBST([PYTHON_PREFIX], [`[ ${__MP_BUILD__} ] &amp;&amp; $PYTHON -c &quot;import sys; sys.stdout.write(sys.prefix);&quot; || echo -n ${prefix}`]) <br><br></div><div class="gmail_quote">where __MP_BUILD__=1 during a managed build, and undefined otherwise?</div>

<div class="gmail_quote"><br></div><div class="gmail_quote">This way when a user outside of MacPorts is installing a python-using-software (built against MP-provided python) and they have set $prefix via configure, it doesn&#39;t get crowbarred into /opt/local/ (or wherever MP is installed.) (Granted, as the .m4 file notes, they will need to set PYTHONPATH or tell python about it in some manner to use it.)</div>
<div class="gmail_quote"><br></div><div class="gmail_quote"> - Eric</div></div></div>