On 11 July 2013 18:05, PJ Eby <pje@telecommunity.com> wrote:
On Thu, Jul 11, 2013 at 10:20 AM, Brett Cannon <brett@python.org> wrote:
> And if people want to promote the -m option then the executable scripts just
> become a secondary convenience. Plus you can't exactly require setuptools to
> create those scripts at install-time with Python if that's when they are
> going to be installed.

You don't need setuptools in order to include .exe wrappers, though:
there's nothing setuptools-specific about the .exe files, they just
run a matching, adjacent 'foo-script.py', which can contain whatever
you want.  Just take the appropriate wrapper .exe, and rename it to
whatever 'foo' you want.

IOW, if you want to ship a pip.exe on windows that just does "from pip
import __main__; __main__()" (or whatever), you can do precisely that,
no setuptools needed.

With the launcher, a .py file with the relevant #! line set pretty much covers things. It's not an exe, although there are very few things I know of that need specifically an exe file, and if you want to omit the ".py" suffix when invoking it you need to add .py to PATHEXT. But actual exe launchers are much less critical nowadays, I believe.

What *is* important, though, is some level of consistency. Before setuptools promoted the idea of declaraive entry points, distributions shipped with a ridiculous variety of attempts to make cross-platform launchers (many of which didn't work very well). I care a lot more about promoting a consistent cross-platform approach than about arguing for any particular solution...

Paul

Paul.