[Distutils] setup.py --install-requires?

Sridhar Ratnakumar sridharr at activestate.com
Wed Apr 8 22:28:24 CEST 2009


Is it possible to get the value of install_requires for an arbitrary 
package without having to parse setup.py?

I see that --name, --version, --description, --provides, and so on are 
available as an argument to setup.py, but --install-requires is missing. 
Why?

For example, zc.catalog declares these dependencies in its setup.py

       install_requires=['ZODB3',
                         'pytz',
                         'setuptools',
                         'zope.catalog',
                         'zope.container',
                         'zope.component',
                         'zope.i18nmessageid',
                         'zope.index>=3.5.1',
                         'zope.interface',
                         'zope.publisher',
                         'zope.schema',
                         'zope.security',
                         ],

Is it possible to reliably get this list in a custom Python code without 
having to parse setup.py?


More information about the Distutils-SIG mailing list