How to adapt ports to different versions of Python

Bryan Blackburn blb at macports.org
Fri Feb 20 15:05:54 PST 2009


On Fri, Feb 20, 2009 at 10:45:57PM +0000, Uldis Bojars said:
> On Fri, Feb 20, 2009 at 5:00 PM, Frank Schima wrote:
> 
> > What one is the right way for creating a port that works w python25:
> > a) create a new port py25-rdflib and make it use "PortGroup python25" ?
> >
> > This is the right way to go because it is a python library.
> >
> > b) remove PortGroup from py-rdflib and add variants "python24" and
> > "python25" to it ?
> 
> Thanks, that's clear.
> 
> I was hoping to keep one portfile instead of creating new for each
> version of python.
> 
> Some ports (for example [1]) use variants python24, python25, ...
> instead of PortGroups. Could you please tell what is wrong with the
> other approach (used by ports such as [1])?

redland-bindings doesn't use a python port group; if you do use a port group
you have to break out the port into multiple (py-, py25-, etc).  This is
unfortunately the way it is for now, until ticket #16723 is implemented:

<http://trac.macports.org/ticket/16723>

Bryan


> 
> [1] http://trac.macports.org/browser/trunk/dports/www/redland-bindings/Portfile
> 
> Uldis
> 
> [ http://captsolo.net/info/ ]


More information about the macports-dev mailing list