Skip to content

Wheel scripts don't get command line wrappers on Windows #2596

Open
@takluyver

Description

@takluyver

When installing a wheel on Windows, if it specifies setuptools console_scripts or gui_scripts entry points, pip creates an exe wrapper so that it can be directly invoked at the command line. Scripts supplied in (data)/scripts/ with a #!python shebang, as described in PEP 427, however, do not get such a wrapper. Generating them is a recommend feature for installers according to the PEP.

I'm happy to work on this, since I'm creating a wheel-building tool that puts scripts in the (data)/scripts/ directory.

Side note: at least for console scripts, is there a good reason to wrap them in a .exe rather than a .cmd file, which would be easier to inspect? In my experience, writing a script.cmd file that does "path\to\python.exe" "%~dp0\script" serves to make a Python script executable from the command line.

Crosslink pypa/flit#1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions