Steve
Steve

Reputation: 1282

Any reason setup.py install_requires should include setuptools?

I've noticed some python projects include setuptools in the list of required modules. My code installs and executes fine without it.

I may be mistaken, but I think the purpose of the install_requires list is to specify the modules needed for execution after installation, not during installation.

Is there some special use-case where it makes sense to install setuptools?

install_requires=[
    'setuptools',
    'requests',
],

Upvotes: 2

Views: 567

Answers (1)

Brecht Machiels
Brecht Machiels

Reputation: 3410

If your project makes use of pkg_resources, for example to load resources from entry points, it's run-time dependent on setuptools (which includes the pkg_resources package).

Since Django's setup.py does not include setuptools as a requirement but does make use of pkg_resouces, this can lead to confusion.

Upvotes: 2

Related Questions