several version of eggs

cedric briner <work-W/[email protected]>
Newsgroups gmane.comp.python.peak
Message-ID <[email protected]>
Hello,

I thought that with eggs, I will be able to choose at run time, which
version of an egg I would like to use.

But after some tests with dummy eggs, I've tried to make it work with
SQLAlchemy for example, with no success at all.

So does some one know if such feature is available with eggs ??

------------------ the example ---------------

easy_install 'SQLAlchemy==0.4.4'
...
easy_install 'SQLAlchemy==0.4.6'
...

python
import pkg_resources
 >>> pkg_resources.require("SQLAlchemy==0.4.6")

[SQLAlchemy 0.4.6 (/home/system/briner/py-lib/SQLAlchemy-0.4.6-
py2.5.egg)]
 >>> pkg_resources.require("SQLAlchemy==0.4.4")

Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 626,
in require
     needed = self.resolve(parse_requirements(requirements))
   File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 528,
in resolve
     raise VersionConflict(dist,req) # XXX put more info here
pkg_resources.VersionConflict: (SQLAlchemy 0.4.6 (/home/system/briner/
py-lib/SQLAlchemy-0.4.6-py2.5.egg),
Requirement.parse('SQLAlchemy==0.4.4'))

Ctrl+D

easy_install 'SQLAlchemy==0.4.4'
...
python
 >>> import pkg_resources
 >>> pkg_resources.require("SQLAlchemy==0.4.4")

[SQLAlchemy 0.4.4 (/home/system/briner/py-lib/SQLAlchemy-0.4.4-
py2.5.egg)]
 >>> pkg_resources.require("SQLAlchemy==0.4.6")

Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 626,
in require
     needed = self.resolve(parse_requirements(requirements))
   File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 528,
in resolve
     raise VersionConflict(dist,req) # XXX put more info here
pkg_resources.VersionConflict: (SQLAlchemy 0.4.4 (/home/system/briner/
py-lib/SQLAlchemy-0.4.4-py2.5.egg),
Requirement.parse('SQLAlchemy==0.4.6'))

-------------------------------
so it feels that the only package I can call is the latest one
installed !!!

cEd
-- 

Cedric BRINER
Geneva - Switzerland
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.