How to handle different versions of Python
I'm fairly new to Macports so please forgive me if this is an 'dumb' question. 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 installed (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 python2.4 directories. 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 situation? It would appear that the python packages are tied to a specific version and are not generic. Is this right? Thanks Susan
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' question.
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 installed (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 python2.4 directories.
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 situation?
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 him.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Ryan Schmidt wrote:
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 him.
Hi, is there something we can do about these duplicated ports? As we have now a python-3.0 devel port there could be much more ports just for this version. Wouldn't be a bin:python:python24/25/30 better? The python ports (python24, python25, python30) could create a symbolic link named "python" so it should be there and can be checked. And for ports which need a specific version we could just check for that one (bin:python25:python25). What do you think about this? Simon - -- + privacy is necessary + using http://gnupg.org + public key id: 0x6115F804EFB33229 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) iD8DBQFG3s4tYRX4BO+zMikRCnYtAKCYVS1aywuzi9180Pi2lg/m/qsXtgCgrqUQ hq3Rj7+gjre8KdJ2OOZd52U= =MVjU -----END PGP SIGNATURE-----
On Sep 5, 2007, at 10:41, Simon Ruderich wrote:
Ryan Schmidt wrote:
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 him.
is there something we can do about these duplicated ports? As we have now a python-3.0 devel port there could be much more ports just for this version.
Wouldn't be a bin:python:python24/25/30 better? The python ports (python24, python25, python30) could create a symbolic link named "python" so it should be there and can be checked.
And for ports which need a specific version we could just check for that one (bin:python25:python25).
I don't use python. But I believe the idea was that there are significant differences between python 2.4 and 2.5, and that there is some software that works with 2.4 but not 2.5, some that works with 2.5 but not 2.4, and some that works with both 2.4 and 2.5 but with significant changes in how that's done. So the decision was to have separate portfiles. I have no information on how python 3.0 fits into the picture now. Perhaps someone who uses python can comment.
participants (3)
-
Ryan Schmidt
-
Simon Ruderich
-
Susan Mackay