Changing distribution versions runtime

Hello all, I would like at runtime to change the used version of installed egg ... (for example based on some condition import specific version) and the only solution i end up with is to remove from the 'working_set' 'by_key' hash the best matched version, added when importing pkg_resources, and then 'resolve' the wished one and add it. otherwise i end up with version conflict. I do not want to add version in package naming (package_0_1) ... but that would be the fastest solution :) What's the best thing i can do? Thanks!

To avoid removing added things in working_set ... i remove the entry for which i need to switch versions in easy-install.pth and then only 'resolve'-ing and 'add'-ing to the working_set. I don't know if this (removing the lines in easy-install.pth) will reflect on easy_install to work properly, but for now i'm happy with this solution :) Still will be very thankful for any comments and suggestions.
participants (1)
-
bl8cki