On Mon, 14 Jan 2008 09:45:29 -0500 Phillip J. Eby wrote:

>         >[1] In fact, this is an intermediary result - I want to
>         compute all the
>         >entry points of a tree of dependencies in such a way that the
>         entry
>         >points of eggs deeper in the tree will always be earlier in
>         the list
>         >than entry points for those shallower in the tree.
>         
>         Why?
>         

We are writing an app on top of postgresql, using sqlobject. The thing
is broken into different re-usable modules - not all of tcanhese modules
need to be installed together.  The idea is to package a module in an
egg, and have the egg advertise all the sqlobject classes (ie, those
that are persisted) via entry points.

We can then write a seperate generic tool which (given the resource spec
of an arbitrary module) can, for example go and create all the database
tables necessary. But this is something that needs to happen in a
specific order because some tables depend on others. We hope to capture
such dependencies using the eggs's dependency mechanism.

The tool can do many other things besides creating tables. For example,
we'd also like to develop a generic framework on top of sqlobject which
will allow us to easily specify the necessary database schema changes,
new tables, changed tables and so on (migrations) that are necessary
when upgrading from one version of our eggs to another.

The idea is that knowledge of classes, tables, and how to migrate old
data would be contained in each module's egg. But the generic code to
create /change databases would be in its own egg.

- Iwan

_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to