[Distutils] How to handle launcher script importability?

Vinay Sajip vinay_sajip at yahoo.co.uk
Thu Aug 15 17:21:28 CEST 2013

PJ Eby <pje <at> telecommunity.com> writes:

> used for these things nowadays, rather than PATH...  but I think it
> only works for .exe's, so there we go again back to the land of .exe's
> just plain Work Better On Windows.)

In that vein, I've updated distlib to install only a single .exe per script, 
where the script is appended to a stock launcher .exe as a zip with the 
script as a single __main__.py in it.

I've not produced a new release, but the BitBucket repos for both distlib 
[1] and the launcher [2] are up to date. Note that the launcher is still not 
the PEP 397 launcher, but the simpler one which I developed when working on 
PEP 405 and whose .exes have been shipping with distlib.

To try it out, you can download the latest distil.py from [3]. My smoke 
tests with both generated and pre-built scripts pass, but I'd be grateful if 
people could try it out and provide feedback.

Wheel support should be up to date in terms of PEP 426 and the discussions 
about launchers: wheel builds should have no platform-specific files other 
than for binary extensions, and when installing from a wheel, wrapped 
scripts declared in the metadata should be installed.


Vinay Sajip

[1] https://bitbucket.org/pypa/distlib
[2] https://bitbucket.org/vinay.sajip/simple_launcher
[3] https://bitbucket.org/vinay.sajip/docs-distil/downloads/distil.py

More information about the Distutils-SIG mailing list