What goes into setup.py's 'requires' field?

asked 2016-05-18 08:08:11 -0600

Felix Duvallet gravatar image

The standard setup.pyfor a ros package looks something like this:

from distutils.core import setup
from catkin_pkg.python_setup import generate_distutils_setup
d = generate_distutils_setup(
    packages=['package_name'],
    package_dir={'': 'src'},
    requires={'rospy'}
)
setup(**d)

I am a little confused as to what goes into the requires={} field. Is it a list of python package requirements similar to what is in package.xml, or something else?

For what it's worth, most code in github doesn't seem to have examples of this being used.

In particular, if my code depends on scikit-learn, what should go in the requires field?

edit retag flag offensive close merge delete