[Distutils] Wheels and console script entry point wrappers (Was: Replacing pip.exe with a Python script)

Vinay Sajip vinay_sajip at yahoo.co.uk
Wed Jul 17 00:43:11 CEST 2013

>I really don't want the wrappers to be present in the wheel, because if they are the wheel becomes architecture-specific. Also, consider that Unix targets should have the actual scripts written with no extension, whereas Windows targets should have foo-script.py and foo.exe. That should be decided at install time, bot at wheel creation time.

I think we're agreed on that as a desirable. I've already changed the distil code to omit writing launchers to the wheel, and that probably won't need to change. But it does generate the scripts for exports - to avoid doing that, we need to get the exports into the wheel in a standardised way (via pydist.json, perhaps, or perhaps a separate file). Iterating over the exports in a distribution path needs to be fast - note that the exports are not just scripts, and it's not yet clear whether the script exports need to be separated out from the rest.

>As regards version-specific scripts, I'd assume it's the project's job to specify precisely what scripts they want. On that one, I'm on the side of providing infrastructure, not setting policy.

This sounds like you mean that distlib needs to stay basic (mechanism/infrastructure), and the installer needs to do the script generation (policy - perhaps controlled by the user). Currently, distlib allows one to specify foo with optional variants fooX and foo-X.Y (before factoring native launchers into the mix). This is set on the ScriptMaker instance which generates the scripts in the target directory (including shebang rewriting, native launchers etc.)


Vinay Sajip

More information about the Distutils-SIG mailing list