If you need compatibility with Windows, either do not remove the extension .py, or use the setuptools parameter entry_points, which automatically generates the appropriate script system files, for example, to set the function pip.main()as a script, pippoints to setup.py:
entry_points=dict(console_scripts=['pip=pip:main',
'pip-%s=pip:main' % sys.version[:3]]),
It makes sense to use entry_pointsit even if you do not need Windows compatibility, because it generates the right shebang for you, which points to a specific python interpreter (where the generic one #! /usr/bin/env pythonwill be wrong).
source
share