If you need Windows compatibility then either don't remove the .py
extension or use setuptools' entry_points
option that automatically generates appropriate for the system script files e.g., to install pip.main()
function as a script, pip
specifies in setup.py
:
entry_points=dict(console_scripts=['pip=pip:main',
'pip-%s=pip:main' % sys.version[:3]]),
It makes sense to use entry_points
even if you don't need Windows compatibility because it generates the correct shebang for you that points to a specific python interpreter (where generic #! /usr/bin/env python
would be the wrong thing).