[Distutils] Is there any sense to put setuptools as a requirement?

Jim Fulton jim at zope.com
Sat Mar 1 22:47:12 CET 2014


On Thu, Feb 27, 2014 at 6:49 AM, Piotr Dobrogost
<p at google-groups-2014.dobrogost.net> wrote:
> Hi!
>
> I've seen people putting 'setuptools' in 'install_requires' in
> setup.py starting with import from setuptools like this:
> from setuptools import setup, find_packages
>
> Does it make any sense?
> In what circumstances should 'setuptools' be listed in
> 'install_requires' or 'setup_requires'?

It makes sense when you use setuptools to implement namespace packages.

So, for example in zope packages, the __init__.py in the zope namespace
package typically has:

    import pkg_resources
    pkg_resources.declare_namespace(__name__)

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton


More information about the Distutils-SIG mailing list