[Distutils] setuptools docs: Declaring Dependencies

Phillip J. Eby pje at telecommunity.com
Wed Sep 21 22:24:42 CEST 2005

At 03:11 PM 9/21/2005 -0500, Ian Bicking wrote:
>I'm reading through the documentation some...
>Regarding this:
> > Note, by the way, that if you declare your dependencies in setup.py,
> > you do not need to use the require() function in your scripts or
> > modules, as long as you either install the project or use setup.py
> > develop to do development work on it. (See "Development Mode" below
> > for more details on using setup.py develop.)
>I don't think this is quite true.  In particular, I've noticed if you
>install a package A --multi-version, it fulfills the requirement for A.
>   And if you have a package B that requires A, when you require('B')
>then A will be loaded (added to sys.path, more technically).  But if B
>is *not* installed --multi-version you can start using it without
>require()ing it, and A won't have been loaded.

What I was trying to say was that scripts installed by easy_install or 
"setup develop" do not require any require()s, as that is handled by the 
generated wrapper.

>Given this, I feel like I need to do the basic require()s in my

I'm not positive that's true.  If you install B without --multi-version, in 
principle it should de-multi-versionize A as well.  (At least, that's what 
I'd expect it to do; I'm not 100% sure if it does.  I know for sure it'll 
do it if "A" isn't installed when you install "B".)  That doesn't mean you 
can't go back and re-MV-ize "A", but there are always ways for people to 
break things.

A full package management tool layered over setuptools should take care of 
things like warning you that you're going to deactivate something needed by 
something else.

More information about the Distutils-SIG mailing list