On 1/12/07, Jorge Vargas <[EMAIL PROTECTED]> wrote:
On 1/10/07, Ksenia <[EMAIL PROTECTED]> wrote: > > Hi, > > I am currently using workingenv.py to run sites that use different > TG/CP versions. But since easy_install has the multi-version option > (-m), it seems a better practice to use it instead. > Anybody using it in production? Are there any pitfalls that I should be > prepared for? > I have seem most people use workingenv.py the problem with -m is that you need to declare on each part of your code which version of the lib you are actually importing. for example import cherrypy will fail on multiversion, since you will need to use a pkg_resources.require() on each import since setuptools has no idea which cp are you importing. from the TG side it should work, can't say for the rest of the packages it depends on I guess the best will be to just try it out, although patching everyone is not a fun task.
Sorry for the late reply. I'm using -m on my development machine. I don't think you have to to pkg_resources.require() on every import - I just do it once at the start of the program (require()-ing all packages I have installed with -m specfying which version I want). I also think if you are running an egg, pkgtools will get the correct package based on EGG_INFO/requires. Arnar --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

