How to handle different versions of Python

Ryan Schmidt ryandesign at
Thu Sep 6 15:40:10 PDT 2007

On Sep 6, 2007, at 17:20, Derek Harland wrote:

> On 7/09/2007, at 8:54 AM, Ryan Schmidt wrote:
>> Well if the goal is simultaneous installation of multiple versions  
>> of python, then a single portfile with variants is not an option,  
>> since you cannot simultaneously install multiple variant versions  
>> of a single port. Only one version of a port can be active at  
>> once. So you need separate ports, as we have now.
> I agree.  However would it not be possible to (theoretically) have  
> a variant install extra files, so that something like
> 	port install some-python-package +python2.5 +python2.4
> would install files for both python2.4 and 2.5?
> I'm not suggesting this as solution ... I don't think its very  
> nice, its more a question for my own understanding of macports.

Oh. Um... well, yes, but... Most ports need to go through phases,  
generally configure, make and make install. Looks like ports in the  
python groups get to skip the configure phase, but still need a make  
(python build) and make install (python phase.  
MacPorts is designed to do these phases once each per port, but if  
you wanted to build both python 2.4 and python 2.5 versions of a  
port, it would probably need to go through each phase twice, once for  
each version of python. Going through a phase more than once is not  
so much supported by MacPorts at this point (though some ports come  
to mind that try very hard to fake it; see "openssl +universal" which  
is quite messy and "php5 +fastcgi +apache[2]" which is less messy but  
still not great).

More information about the macports-users mailing list