[Tutor] setup.py "script" vs "console_scripts" Was: if __name__=='main' vs entry points: What to teach new comers?

Ben Finney ben+python at benfinney.id.au
Sat Aug 5 00:14:01 EDT 2017


Thomas Güttler <guettliml at thomas-guettler.de> writes:

> The underlaying question is: Imangine you are a newcomer.

A newcomer is in a tough position when it comes to packaging and
distributing Python code, especially the command-line programs.

There has been significant progress on this in recent years. The
Setuptools third-party library is a lot saner, the inclusion of ‘pip’ in
standard installs makes it much broader in scope.

But *not* in the standard library today, it's true.

> You need a guide like 'if unsure do x'. With other words: What is the
> sane default choice?

There isn't a good answer to that question, today.

The best answer today is: Read the guides from the Python Packaging
Authority, and stay abreast of developments because this continues to
change.

Maybe eventually the ongoing work of the PyPA will be settled enough
that it can update the standard library Distutils. But not today.

-- 
 \      “Nothing is more sacred than the facts.” —Sam Harris, _The End |
  `\                                                   of Faith_, 2004 |
_o__)                                                                  |
Ben Finney



More information about the Tutor mailing list