python_select can break MacPorts builds

Rainer Müller raimue at
Fri Feb 18 17:13:14 PST 2011

On 2011-02-19 01:42 , Ben Tompkins wrote:
> It seems to me that it is the responsibility not of the end-user but
> of the author of the port file to cache, modify as necessary, and
> restore the python_select-ed version of python.

You are right, Portfile authors and maintainers should not rely on
'python' in PATH. The python_select tool - or more general the
functionality of 'port select' - is meant for the end-user only.

Please report such failures as a ticket in Trac [1], so the maintainer
is aware of the problem.

To solve this, we need to set configure.python accordingly. This
modifies the PYTHON environment variable (usually respected by autotools):
  configure.python ${prefix}/bin/pythonX.Y

If the script uses the common shebang line of
  #!/usr/bin/env python
then add a patch and/or reinplace to change that to the
${prefix}/bin/pythonX.Y binary you want to use.



More information about the macports-users mailing list