[Zope3-dev] Cleaning up dependencies for Zope 3.4 eggs
Stephan Richter
srichter at cosmos.phy.tufts.edu
Thu Apr 5 12:52:54 EDT 2007
On Thursday 05 April 2007 12:33, Brian Sutherland wrote:
> 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)
Yeah, this is a really good start! The next step would be to download the
requirements and do this same thing again generating the graph.
Thanks for sharing!
Regards,
Stephan
--
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
More information about the Zope3-dev
mailing list