setuptools versus distutils

373 views
Skip to first unread message

David Moss

unread,
Sep 27, 2008, 5:11:38 AM9/27/08
to netaddr
Before making any hard and fast decisions, what are your preferences
and feelings regarding the use of setuptools versus distutils for our
setup script?

Sebastien D. has raised Issue 16 in the bug tracker requesting the
addition of setuptools support :-

http://code.google.com/p/netaddr/issues/detail?id=16

Personally, I'd like to make netaddr as easy to use as possible
without binding users to external dependencies or Python versions
without good reason. As distutils comes with Python itself I chose
that in preference to setuptools from the outset.

That being said, I haven't spent much time or effort looking into
setuptools so I'm very willing to be convinced of its benefits if
there are strong enough feelings in support of its use.

Discussion, debate and your thoughts on this matter would be greatly
appreciated in coming to an amicable solution.

Thanks,

Dave M.

James William Pye

unread,
Sep 27, 2008, 6:52:42 AM9/27/08
to net...@googlegroups.com
Don't see any reason why we can't have one or the other:

try:
from setuptools import setup
except ImportError:
from distutils.core import setup


?

David Moss

unread,
Sep 27, 2008, 3:07:17 PM9/27/08
to netaddr
Some questions :-

1) I take it that setuptools is backwards compatible with distutils
(otherwise this wouldn't work) as long as I leave out any setuptools
specific options?

2) Are there any firewall related issues when using setuptools - i.e.
does it need to get out to PyPI when you run setup.py or is that only
if you list dependencies in your setup?

I haven't had good experiences with code requiring setuptools
(TurboGears if memory serves me well) which caused big problems for me
as I'm behind a fairly strict firewall setup at work.

3) Would you recommend including ez_setup.py in netaddr's tarball?

This is going to require some time to test.

Dave M.

Sebastien Douche

unread,
Sep 27, 2008, 3:37:49 PM9/27/08
to net...@googlegroups.com
On Sat, Sep 27, 2008 at 21:07, David Moss <drk...@gmail.com> wrote:
> Some questions :-
>
> 1) I take it that setuptools is backwards compatible with distutils
> (otherwise this wouldn't work) as long as I leave out any setuptools
> specific options?

Setuptools is a extension of Distutils, he adds commands (bdist_egg
for ex.). Thus yes, Setuptools is fully compatible with distutils.

> 2) Are there any firewall related issues when using setuptools - i.e.
> does it need to get out to PyPI when you run setup.py or is that only
> if you list dependencies in your setup?

As far I know, no related issue with firewall. Setuptools uses only
http. I develop on Zope3, witch uses intensively Eggs (>200) without
any such problem.

> 3) Would you recommend including ez_setup.py in netaddr's tarball?

No, setuptools is a require.

I cannot understand your timidity about Setuptools :).

--
Seb

James William Pye

unread,
Sep 28, 2008, 1:45:52 AM9/28/08
to net...@googlegroups.com
On Sep 27, 2008, at 12:37 PM, Sebastien Douche wrote:
>> 3) Would you recommend including ez_setup.py in netaddr's tarball?
>
> No, setuptools is a require.
>
> I cannot understand your timidity about Setuptools :).

I can. There are a lot of issues with setuptools, but the pros do
ultimately out weigh the cons, IMO.

It's the unfortunate wave of the future. >8)

David Moss

unread,
Sep 28, 2008, 8:18:39 AM9/28/08
to netaddr
> I cannot understand your timidity about Setuptools :).

Careful now, do not confuse and/or equate timidity with caution ;-)

As it appears important I'll spend some time getting to know
setuptools. Without it being in the standard library I want to ensure
backward compatibility with distutils before I'll be happy to use it.

Links to any relevant discussions elsewhere for and against setuptools
would also be useful if you have them!

Dave M.

Duncan McGreggor

unread,
Sep 28, 2008, 1:39:55 PM9/28/08
to net...@googlegroups.com
On Sun, Sep 28, 2008 at 7:18 AM, David Moss <drk...@gmail.com> wrote:
>
>> I cannot understand your timidity about Setuptools :).
>
> Careful now, do not confuse and/or equate timidity with caution ;-)

And he's cautious for good reason. Though I myself have had only
limited problems with setuptools, I know lots of very hard-core
developers who have had problems. In fact, they condemn setuptools
completely. Even Phillip Eby (the original author) has expressed some
reservations about some of its implementation.

That being said, I don't abhor setuptools the way that some of my
friends and peers do :-) I use it consistently on my projects in order
to provide users with the greatest degree of flexibility and ease in
using my software.

I would urge David to use it if only for this reason, but also warn
him that he may have to suffer some pains in order to bring this
benefit to his users... ;-)

d

Duncan McGreggor

unread,
Sep 28, 2008, 1:45:33 PM9/28/08
to net...@googlegroups.com
On Sun, Sep 28, 2008 at 7:18 AM, David Moss <drk...@gmail.com> wrote:
>

Here's a fairly extensive note from the creator of the Twisted project:
http://mail.python.org/pipermail/python-dev/2008-March/077903.html

Phillip Eby's response is also informative:
http://mail.python.org/pipermail/python-dev/2008-March/077964.html

d

Sebastien Douche

unread,
Sep 28, 2008, 4:13:34 PM9/28/08
to net...@googlegroups.com
On Sun, Sep 28, 2008 at 19:45, Duncan McGreggor
<duncan.m...@gmail.com> > Here's a fairly extensive note from the

Twisted people[1] are known to hate Setuptools :). I admit Setuptools
is like a hack (due to Distutils misconception) but It is very useful.

See enlightening threads on distutils-sig mailing list for the future
of distutils:
http://mail.python.org/pipermail/distutils-sig/2008-September/010010.html
http://mail.python.org/pipermail/distutils-sig/2008-September/010031.html
http://mail.python.org/pipermail/distutils-sig/2008-September/010080.html
http://mail.python.org/pipermail/distutils-sig/2008-September/010112.html
http://mail.python.org/pipermail/distutils-sig/2008-September/010118.html


[1] I had a Twisted core dev in my team.

--
Seb

Duncan McGreggor

unread,
Sep 28, 2008, 4:51:17 PM9/28/08
to net...@googlegroups.com

These are really good posts; they do a nice job of weighing the
benefits of setuptools.

> [1] I had a Twisted core dev in my team.

Was that Thomas Hervé?

d

Sebastien Douche

unread,
Sep 28, 2008, 5:24:03 PM9/28/08
to net...@googlegroups.com
On Sun, Sep 28, 2008 at 22:51, Duncan McGreggor
<duncan.m...@gmail.com> >> [1] I had a Twisted core dev in my

team.
>
> Was that Thomas Hervé?

Yes, he was. Very good hacker, now in Canonical.


--
Seb

Duncan McGreggor

unread,
Sep 28, 2008, 6:20:46 PM9/28/08
to net...@googlegroups.com

Ha! That's so cool :-) I just joined the same team at Canonical :-)
He's a good guy. He and I sprinted together at PyCon 2006 on some
Twisted/Nevow stuff when (I think) he was with your company. Small
world :-)

d

Reply all
Reply to author
Forward
0 new messages