On Thu, Apr 05, 2007 at 11:34:50AM -0400, Stephan Richter wrote: > On Thursday 05 April 2007 11:08, Bernd Dorn wrote: > > i use this tiny script > > > > http://svn.zope.org/z3c.configurator/trunk/importchecker.py? > > rev=73771&view=log > > Right, I know about the importchecker. But it does nto generate the > dependency > tree for me and is agnostic to optional dependencies, which are supported by > setuptools. I really want to hook into the dependencies of the setup script.
This is the way I'm using to get at the config of setup.py in some of my tools: from distutils.core import run_setup dist = run_setup('setup.py', stop_after='config') Then, it get's a little complex to actually get the data you want. I've been doing something like: from pkg_resources import parse_requirements requires = parse_requirements(dist.install_requires) for req in requires: if req.specs: for spec in req.specs: op, version = spec print '%s (%s %s)' % (req.project_name, op, version) > > Regards, > Stephan > -- > Stephan Richter > CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student) > Web2k - Web Software Design, Development and Training > _______________________________________________ > Zope3-dev mailing list > Zope3firstname.lastname@example.org > Unsub: http://mail.zope.org/mailman/options/zope3-dev/jinty%40web.de > > -- Brian Sutherland _______________________________________________ Zope3-dev mailing list Zope3email@example.com Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com