[Distutils] Is there any sense to put setuptools as a requirement?
Marcus Smith
qwcode at gmail.com
Sun Mar 2 04:28:05 CET 2014
with pip 1.5 able to install from wheel without setuptools, it's more
critical now to declare the dependency (in the cases PJ mentions), to
ensure setuptools gets installed.
On Sat, Mar 1, 2014 at 6:49 PM, PJ Eby <pje at telecommunity.com> wrote:
> On Sat, Mar 1, 2014 at 4:47 PM, Jim Fulton <jim at zope.com> wrote:
>
>> 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__)
>>
>
> It also makes sense if you use entry points, the plugin finder, or any
> other pkg_resources features, for that matter. ;-) Or if you reuse
> setuptools functionality (e.g. easy_install) to install plugins for your
> app.
>
> But in general, it only makes sense to depend on setuptools if your actual
> project contents (aside from setup.py) are importing things from
> pkg_resources or setuptools.
>
>
> _______________________________________________
> Distutils-SIG maillist - Distutils-SIG at python.org
> https://mail.python.org/mailman/listinfo/distutils-sig
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20140301/c1309dd0/attachment.html>
More information about the Distutils-SIG
mailing list