[Tutor] The sane default choice is entry_points console_scripts Was: if __name__=='main' vs entry points: What to teach new comers?

Thomas Güttler guettliml at thomas-guettler.de
Wed Aug 9 10:39:44 EDT 2017



Am 08.08.2017 um 12:56 schrieb Chris Warrick:
> On 8 August 2017 at 03:30, Ben Finney <ben+python at benfinney.id.au> wrote:
>> Thomas Güttler <guettliml at thomas-guettler.de> writes:
>>
>>> Why is "the sane default is 'use console_scripts entry-point in
>>> setup.py'" not a good answer?
>>
>> Because third-party Setuptools is required for entry points, which means
>> entry points cannot be a default choice.
>>
>> It may well be a good choice for many cases. But that's a different
>> matter from it being a good *default* choice; it can only be a default
>> choice if it's in the standard library.
> 
> While setuptools is not officially part of the stdlib, it *is*
> recommended by the official documentation, the dev team, and it’s
> available pretty much everywhere. setuptools can’t be in stdlib,
> because it’s moving too fast for stdlib to keep up.
> 
> Look here: http://pythonwheels.com/ — 254 of the top 360 packages on
> PyPI use wheels. It means that at least that many use setuptools;
> sometimes with a distutils fallback, but often without one. Moreover,
> many of the packages without wheels use setuptools as well.
> 



> The sane default choice is entry_points.

Sounds good. Thank you for this statement.

Regards,
   Thomas Güttler




-- 
Thomas Guettler http://www.thomas-guettler.de/


More information about the Tutor mailing list