Re: problems build root on OSX against non-system python version

From: Chris Jones <jonesc_at_hep.phy.cam.ac.uk>
Date: Tue, 13 Sep 2011 19:24:29 +0100


Hi,

On 13 Sep 2011, at 7:13pm, <wlavrijsen_at_lbl.gov> <wlavrijsen_at_lbl.gov> wrote:

> Chris,
>

>> pythonvers=`python -c 'import sys; sys.stdout.write(sys.version[:3])'`

>
> yes, the upshot here is that 'python' is taken from PATH, which in practice
> gives the least confusion.
>
>> I need to be able to inform the ./configure script that the python binary
>> name it should use is 'python2.6', and not 'python'. Is there anyway to do
>> this ?

>
> Is it possible to add the MacPorts python to PATH?

They already are, just not as 'python'. They are available as 'python2.6' and 'python2.7'. MacPorts supports multiple python versions so cannot just call them 'python'.

> In particular, AFAIK,
> there are three MacPorts pythons supplied (p2.5 through p2.7) so I'd say
> that it is preferable to have whichever of these is "active" rather than
> a specific python.

Sorry but no, thats not the way it works. The build cannot and should not rely on what the user has set up via their PATHS as their 'default' version. It is perfectly possible that a user wants python2.7 as their default but then chooses to build root against python2.6.

The only way I can see this working for MacPorts is if I can tell the root configure script in someway precisely which python executable it should run to check versions etc., and not just assume 'python'. Something like an environment variable I can set, say

ROOTPYTHONEXEC='python2.6'

and then the configure script checks if that exists and uses it. If it is missing, default back to assuming just 'python'.

cheers Chris

>
> Best regards,
> Wim
> --
> WLavrijsen_at_lbl.gov -- +1 (510) 486 6411 -- www.lavrijsen.net
>

Received on Tue Sep 13 2011 - 20:24:38 CEST

This archive was generated by hypermail 2.2.0 : Wed Sep 14 2011 - 17:50:01 CEST