[Distutils] Adding entry points into Distutils ?

Paul Moore p.f.moore at gmail.com
Thu May 7 14:54:01 CEST 2009

2009/5/7 Doug Hellmann <doug.hellmann at gmail.com>:
> I would argue the other way.  Why force authors of console scripts to deal
> with entry points instead of just installing the script as-is?

Please explain "as-is" with reference to ensuring that the script
works cross-platform. I think the benefit of entry points for scripts
is that it generates appropriate wrappers to allow use on all

Having said that, I find setuptools entry points to be
over-engineered, and the Windows wrappers (in particular, the fact
that they are not version-independent) to be somewhat clumsy. But as a
concept, I like the idea of having a way of specifying that a script
is intended as an "executable", and having distutils do the job of
generating whatever platform cruft is required [1] to make that work.

Of course, for even remotely modern Python versions, I'd argue
strongly that packages shouldn't be including console scripts, but
should rather be supplying modules that can be run as scripts, via the
-m argument to python. Users can then build aliases, shell scripts, or
whatever is appropriate based on that.


[1] And note especially that .bat files are *not* suitable wrappers on
Windows, in spite of the fact that they are commonly used. Their
biggest disadvantage is that they don't nest.

More information about the Distutils-SIG mailing list