several version of eggs

2008-10-07 Thread Sed
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 "", line 1, in 
  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 "", line 1, in 
  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
--
http://mail.python.org/mailman/listinfo/python-list


Re: several version of eggs

2008-10-07 Thread Sed
> you need to easy_install with -m/--multi-version. All of your packages.
Unfortunately, this is not even working :(
let's try it:

$ easy_install -m 'SQLAlchemy==0.4.6'
...
$ easy_install -m 'SQLAlchemy==0.4.4'
...

check that the easy-install.pth doesn't contain any more some sql
entry:
$ grep -i sql /home/system/briner/py-lib/easy-install.pth
./SQLObject-0.9.4-py2.4.egg
no more sqlachemy in it

$ 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 "", line 1, in 
  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'))

CTRL+D

So it seems that we still have the same behavior as described before

> Diez

cEd

--
http://mail.python.org/mailman/listinfo/python-list


Re: several version of eggs

2008-10-08 Thread Sed
On Oct 7, 5:14 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> Sed wrote:
> >> you need to easy_install with -m/--multi-version. All of your packages.
> > Unfortunately, this is not even working :(
>
> It is.

I see !!! thanks !!!

the fact is that if you have only one egg of sqlachemy module (for
example) which was not installed with easy_install -m, then you get
stuck !

I was having 3 eggs for sqlalchemy:- 2 of them with -m
   - 1 of them without -m  (that was
the mistake).

thanks again.

cEd
--
http://mail.python.org/mailman/listinfo/python-list