Project organization and import
Russell E. Owen
rowen at cesmail.net
Tue Mar 6 21:02:44 CET 2007
In article <1173205801.346941.201060 at 8g2000cwh.googlegroups.com>,
"Martin Unsal" <martinunsal at gmail.com> wrote:
> On Mar 6, 9:34 am, "Chris Mellon" <arka... at gmail.com> wrote:
> > It assumes that util.common is a module thats on the PYTHONPATH.
> Now we're getting somewhere. :)
> > The common way to ensure that this is the case is either to handle
> > util as a separate project, and install it into the system
> > site-packages just as you would any third party package,
> This breaks if you ever need to test more than one branch of the same
> code base. I use a release branch and a development branch. Only the
> release branch goes into site-packages, but obviously I do most of my
> work in the development branch.
This is an interesting point that we are just facing. If you have a big
package for all your stuff and you want to separately version components
of it, you do run into problems. The solution we are adopting is to
write a custom import hook, but a simpler solution is to make sure each
separately versioned component is a top-level package (in which case you
can manipulate PYTHONPATH to temporarily "install" a test version).
More information about the Python-list