[Tutor] setup.py "script" vs "console_scripts" Was: if __name__=='main' vs entry points: What to teach new comers?
Chris Warrick
kwpolska at gmail.com
Fri Aug 4 14:51:15 EDT 2017
On 4 August 2017 at 12:15, Thomas Güttler <guettliml at thomas-guettler.de> wrote:
> Chris wrote "Simple: `scripts` are legacy."
>
> You say it is the standard, and console_scripts is from a third party.
>
> For me "legacy" sound like "don't go this old way".
>
> For me "third party" sounds like "don't go this way, stick to the standard".
>
> I feel stupid since I have no clue.
The official docs recommend distutils:
https://docs.python.org/2/library/distutils.html
> Most Python users will not want to use this module directly, but instead use the cross-version tools maintained by the Python Packaging Authority. In particular, setuptools is an enhanced alternative to distutils that provides:
> [snip]
> * the ability to declare project “entry points”, which can be used as the basis for application plugin systems
> * the ability to automatically generate Windows command line executables at installation time rather than needing to prebuild them
And, as eryk sun mentioned, recent Python 2.7 and 3.4 versions ship
setuptools and pip, via the ensurepip module.
--
Chris Warrick <https://chriswarrick.com/>
PGP: 5EAAEA16
More information about the Tutor
mailing list