[Distutils] EasyInstall: installing from svn

Ian Bicking ianb at imagescape.com
Fri Jun 3 22:56:36 CEST 2005


Now I'm feeling confused about how installation from svn should work. 
Or more generally, how deployment and development work.

Usually in development, I like to install libraries directly out of svn 
(no distutil step).  Then I can fiddle with them if necessary, commit 
changes (or create diffs if I don't have commit access), etc.  This is 
all much easier to do when there's no distutil step.

When deploying, that's not really what I want to do, even though I might 
very well be deploying from a repository.  What easy_install does now 
with svn repositories is good in that case.

The problem is that the two are conflicting.  If I require a package, 
I'm not going to get the svn checkout, even if the checkout was on the 
path initially.  Since the egg package names don't map to Python 
packages, you can't even really tell that a package is already available 
without egg installation.  The only way I can think of right now to 
safely do this would be:

try:
     import wsgiutils
except ImportError:
     require('WSGI-Utils')

Ick.  So how can I set up a working environment that is close, but not 
too close, to the deployment environment?  Maybe there's a way that, up 
front, I can specify which packages are made available through alternate 
methods?  E.g., fulfill_requirement('WSGI-Utils', 'checkouts/WSGIUtils') 
(where adding the second path to sys.path will fulfill the requirement, 
irrespective of any eggs).

   Ian


More information about the Distutils-SIG mailing list