[Grok-dev] Grok and eggs

Martijn Faassen faassen at startifact.com
Fri Feb 20 17:37:01 EST 2009


Hi there,

Kim Luong wrote:
> Martijn Faassen wrote:
[snip]
> The issue is this. We have an existing paste serve application. We want 
> to incorporate a dynamic grok app into it. We thought we could do this 
> by creating a grok app with grokproject and then packaging it as an egg 
> and using it from the existing paste serve app. But what you've said 
> means this is not possible.

You could do it by locking down all the requirements in the setup.py of 
your app's setup.py. I.e. you'd transform versions.cfg into a setup.py 
dependency listing.

Alternatively you could also use 'pip' instead of 'easy_install' and 
transform Grok's version list to a pip compatible one.

Both is assuming you have some way to get the rest set up somehow; the 
object database and the config files required and so on. If you don't 
use buildout you need to figure out how these themselves are configured. 
I guess this is similar to config files or database access that any web 
framework will need, though.

> The only alternative we see is to access the grok app using the paste 
> proxy code, treating it like it is similar to php instead of capable of 
> full integration with pre-existing wsgi apps. This is disappointing but 
> doable. But I think it is important to note that, despite some level of 
> paster support, the way grok works with grokproject makes it not the 
> fully mix-and-match experience that we have come to expect from native 
> wsgi components.

I think any application built from a large set of components, WSGI or 
not, will have to face the version management situation at some point. 
You can't just go assuming any version of a dependency will just work, 
after all.

Regards,

Martijn



More information about the Grok-dev mailing list