[117817] trunk/dports/devel/automake

David Evans devans at macports.org
Wed Mar 19 22:11:59 PDT 2014


On 3/19/14 6:48 PM, Adam Mercer wrote:
> Hi
>
> This change is breaking a lot of things for me. I use the MacPorts
> automake to create the build system for various development projects
> and this change causes the build system to try to install all python
> libraries into the MacPorts location, this is clearly not correct as
> only MacPorts should install files into the MacPorts directory
> structure.
>
> Cheers
>
> Adam
If that is what is happening then you must be using the MacPorts Python
ports as well. 

The intent of the patch is for the macro to determine the
correct Python installation paths for whichever Python is passed in env var
PYTHON or failing that whichever Python it finds in the current search path.

So if you are building a non-MacPorts project you should be using a
non-MacPorts
Python that is built to expect your installed Python modules where ever you
plan to install them. 

That's not very clear, is it?  I hope you understand my point.  You want
these paths
to point to where the Python in use will search for modules, not just in
the arbitrary
locations ${prefix} and ${exec_prefix} (although that's the norm for
non-MacPorts installations).

Dave
>
> On Thu, Mar 13, 2014 at 5:45 PM,  <devans at macports.org> wrote:
>> Revision 117817 Author devans at macports.org Date 2014-03-13 15:45:31 -0700
>> (Thu, 13 Mar 2014)
>>
>> Log Message
>>
>> automake: patch m4/python.m4 to allow AM_PYTHON_PATH to correctly determine
>> the values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX for the parallel install
>> file structure used by MacPorts, increment revision.
>>
>> Modified Paths
>>
>> trunk/dports/devel/automake/Portfile
>>
>> Added Paths
>>
>> trunk/dports/devel/automake/files/
>> trunk/dports/devel/automake/files/patch-m4-python.m4.diff
>>
>> Diff
>>
>> Modified: trunk/dports/devel/automake/Portfile (117816 => 117817)
>>
>> --- trunk/dports/devel/automake/Portfile	2014-03-13 19:16:42 UTC (rev
>> 117816)
>> +++ trunk/dports/devel/automake/Portfile	2014-03-13 22:45:31 UTC (rev
>> 117817)
>> @@ -4,6 +4,7 @@
>>
>>  name                automake
>>  version             1.14.1
>> +revision            1
>>  categories          devel
>>  license             {GPL-2+ Permissive}
>>  installs_libs       no
>> @@ -26,6 +27,14 @@
>>  depends_build       port:autoconf
>>  depends_lib         path:bin/perl:perl5
>>
>> +# patch m4/python.m4 to allow AM_PYTHON_PATH to correctly
>> +# determine the values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX
>> +# for the parallel install file structure used by MacPorts
>> +# query the Python executable specified in PYTHON rather
>> +# than assume the standard values prefix and exec_prefix
>> +
>> +patchfiles          patch-m4-python.m4.diff
>> +
>>  configure.args      --infodir=${prefix}/share/info
>>  configure.perl      ${prefix}/bin/perl
>>
>>
>> Added: trunk/dports/devel/automake/files/patch-m4-python.m4.diff (0 =>
>> 117817)
>>
>> --- trunk/dports/devel/automake/files/patch-m4-python.m4.diff	
>> (rev 0)
>> +++ trunk/dports/devel/automake/files/patch-m4-python.m4.diff	2014-03-13
>> 22:45:31 UTC (rev 117817)
>> @@ -0,0 +1,18 @@
>> +--- m4/python.m4.orig	2014-03-13 14:25:51.000000000 -0700
>> ++++ m4/python.m4	2014-03-13 14:34:43.000000000 -0700
>> +@@ -96,8 +96,13 @@
>> +   dnl distinct variables so they can be overridden if need be.  However,
>> +   dnl general consensus is that you shouldn't need this ability.
>> +
>> +-  AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
>> +-  AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
>> ++  dnl This is not always true for MacPorts due to the file structure used
>> ++  dnl to install multiple versions of Python in parallel. Rather than
>> ++  dnl assuming the standard values of $prefix and $exec_prefix, we
>> ++  dnl determine them by querying the Python executable specified in
>> $PYTHON
>> ++
>> ++  AC_SUBST([PYTHON_PREFIX], [`$PYTHON -c "import sys;
>> sys.stdout.write(sys.prefix);"`])
>> ++  AC_SUBST([PYTHON_EXEC_PREFIX], [`$PYTHON -c "import sys;
>> sys.stdout.write(sys.exec_prefix);"`])
>> +
>> +   dnl At times (like when building shared libraries) you may want
>> +   dnl to know which OS platform Python thinks this is.
>>
>>
>> _______________________________________________
>> macports-changes mailing list
>> macports-changes at lists.macosforge.org
>> https://lists.macosforge.org/mailman/listinfo/macports-changes
>>



More information about the macports-dev mailing list