[Tutor] setup.py "script" vs "console_scripts" Was: if __name__=='main' vs entry points: What to teach new comers?
Thomas Güttler
guettliml at thomas-guettler.de
Fri Aug 4 06:15:21 EDT 2017
Am 04.08.2017 um 02:50 schrieb Ben Finney:
> Thomas Güttler <guettliml at thomas-guettler.de> writes:
>
>> Why are there two ways: "script" vs "console_scripts entry-point"?
>
> Because Distutils implements only ‘scripts’, and that's not capable
> enough for what people need so Setuptools implements entry points.
>
> In other words: One of them is in the standard library and does
> something; the other is third-party and can do more.
>
> That answers why there are two. But maybe you wanted to ask some
> underlying question?
The underlaying question is: Imangine you are a newcomer. And there
are two more choices. You need a guide like 'if unsure do x'. With
other words: What is the sane default choice?
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.
Regards,
Thomas Güttler
--
Thomas Guettler http://www.thomas-guettler.de/
More information about the Tutor
mailing list