On 9 August 2017 at 23:15, Steven D'Aprano <st...@pearwood.info> wrote:
> On Tue, Aug 08, 2017 at 12:56:56PM +0200, Chris Warrick wrote:
>> While setuptools is not officially part of the stdlib,
> This is the critical factor. How can you use *by default* something that
> is *NOT* supplied by default?
> Obviously you cannot. It is physically impossible.

The problem with setuptools (and pip) is that they are not first-party
stdlib members, but they are not third-party packages either. They’re
somewhere in between. They have been blessed by the core developers.
And yes, setuptools might be in all the places you mentioned:

> But this does NOT hold for everyone, possibly not even for the majority
> of Python users. For example:
> - students using their school's computers;
> - corporate and government users using a SOE (Standard Operating
>   Environment);
> - people using a system where, for policy reasons, only the
>   standard library is permitted.

* If those computers run Windows (as they often do) and run a recent
Python version (3.4 or newer/2.7.9 or newer), setuptools will be
installed, unless the IT people explicitly disabled ensurepip.
* On macOS, setuptools will be installed if they’re using the system
Python, the python.org installers (which are not uninstallable), or
Python from Homebrew. The last two also have pip, and system Python
has ensurepip.
* On Linux, setuptools/pip is likely to be there, but it’s not
required in all distributions. (Fedora mandates setuptools; Debian
even rips out ensurepip by default and hides it in python3-venv
because reasons…)

If the users are meant to install Python packages, their system
administrators would take care of that — either by setting up
setuptools/pip and perhaps virtualenv, or taking install requests from
users. If users are not supposed to be running setuptools/pip, they
probably shouldn’t, but they can still install it from ensurepip or
downloading get-pip.py.

> I've worked in places where installing unauthorized software was a
> firing offence.

Those people don’t need setuptools. Those people should not be using
distutils either. They might not even be allowed to download packages
and run __main__.py without installation.

Chris Warrick <https://chriswarrick.com/>
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:

Reply via email to