On Thu, Mar 10, 2011 at 12:57 PM, DaleB <dal...@gmail.com> wrote:
> Hi all,
>
> i could use some advice for a good packaging workflow.
>
> So far i used to put an "apps"-folder in my project root and i stored
> all individual apps in a sub-folder.
> This works, but i thought: "Okay, try to decouple things a bit more
> and try to create some 'real' reusable apps."
>
> So i followed Jacob's guide on buildout (http://jacobian.org/writing/
> django-apps-with-buildout) and thanks to the clear and detailed
> instructions i managed to build a nice package for one of my apps.
> Okay, so i removed the according sub-folder from my app-dir, installed
> my new package to the virtualenv containing my project and everything
> worked ... Nice!
>
> BUT ...
>
> I see that this is really great for the distribution of an app.
> But what about development and "continuous packaging"?
> I mean, my project consists of more than five apps. One side of me
> would rather turn them all into installable packages so i get a nice
> decoupled environment.
>
> But how do i work on my projects once things are separated?
> I mean, in reality, though functional distinct, the apps work together
> and interact to form a site as whole.
> So, to get a complete feeling and an overview for what my app does (or
> breaks) i need to see it embedded in a working site.
> I got this, when all different apps where folders under the same root-
> dir. I could easily edit things in one app and see the results
> immediately on my site. Due to version control it was easy to rollback
> changes that were problematic.
>
> Do i simply miss an important point? Am i just spilled by the
> monolithic workflow?
> How do you implement new features? Do you just concentrate on a single
> app (in a separated buildout dir), test everything, package it and
> finally install the new version and
> then check if everything fits still together? (And if not, go back to
> your app, package it again, install it etc.)
>
> I'd really love to hear some strategies how you cope with this.
>
> Thanks,
> Andreas

buildout offers a feature called development eggs.  In addition to listing
your eggs in the "eggs" variable of the [buildout] section, you list the
path to the egg source (containing setup.py, etc.) in the "develop"
variable.  This keeps buildout from trying to down load the egg and,
I believe, make a directory "develop-eggs" (a sibling of buildout.cfg)
containing ".link" files, each containing the path to where you can import
the package (typically the folder containing setup.py).

zope's recipe, I think, uses these to figure out what all to add to sys.path
in the various python based executable scripts that it makes in the bin
subdirectory, so that other code can just import the package by name.
I'm not sure whether the django deployment instructions you have will
use these, but if not you could certainly make a module for inclusion
by settings.py that figured out what to add to sys.path (if it's not already
there) by inspecting the files in the develop-eggs directory.

Bill

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to