Kevin Dangoor wrote:
> setuptools lets you declare install_requires with a set of packages.
> This is handy and is nicer than the "old way".
> 
> In one of my __init__.py files, I am redeclaring my requirements using
> pkg_resources.require, to ensure that they're all still available and
> to load them properly.
> 
> Does it make sense to run pkg_resources.require at runtime? (I think
> so...) If so, it seems like a function could be added to pkg_resources
> that goes through this egg's required dependencies and does a
> require() on them. Something like
> pkg_resources.requireAll("MyProjectName").

I think it's required that you use require(); without requiring a 
package, it may not be available (if it was installed --multi-version), 
as requiring a package can change sys.path.

Though... does a package's requirements get required when you require 
the package?  Does this mean some things will work when you require 
them, but not if you just import them, even though the import otherwise 
seems to work?

OK... well, no real answer from me then ;)

-- 
Ian Bicking  /  [EMAIL PROTECTED]  /  http://blog.ianbicking.org
_______________________________________________
Distutils-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to