How to handle different versions of Python
ryandesign at macports.org
Tue Sep 4 11:54:47 PDT 2007
On Sep 4, 2007, at 06:17, Susan Mackay wrote:
> I'm fairly new to Macports so please forgive me if this is an 'dumb'
> I am trying to build gtk-sharp, which uses avahi which, in turn, uses
> py-gdbm. For various reasons, I have both python2.4 and python2.5
> (both installed as dependencies for other packages - I have no
> knowledge of
> python and have not installed either from 'choice').
> When configuring avahi, it could not find py-gdbm although the 'ports
> installed' command listed it as active.
> It turns out that the python 'sys.path' command includes all of the
> pythin2.5 directories, but the py-gdbm package installs into the
> I have subsequently changed the avahi dependency from 'py-gdbm' to
> 'py25-gdbm' and it has installed correctly. However I don't think
> that this
> should be the sort of thing that I should be 'playing' with.
> What is the correct process that I should be using to handle this
> It would appear that the python packages are tied to a specific
> version and
> are not generic. Is this right?
Yes, that's right. A python port either uses python2.4 or it uses
python2.5. If a python port could work with either, then two ports
should be created. The one with the py- prefix is for python2.4 and
the one with the py25- prefix is for python2.5. Then there are other
ports like avahi which are not in the python category and don't have
a py- or py25- prefix. These use either python2.4 or python2.5 as
decided by the port author. I don't use any python software so I
don't know the implications of changing the avahi dependency from py-
gdbm to py25-gdbm. Perhaps the port author could comment. I'm Cc'ing
More information about the macports-users