PEP 582: Add more explanation based on feedback (#2983)

* Updates based on feedback

Adds explanation of handling `bin/` directory, or how we are not
trying to replace the existing virtual environments.

* Updates grammar based on feedback
This commit is contained in:
Kushal Das 2023-01-29 20:18:01 +01:00 committed by GitHub
parent 32eab9398d
commit e25c1fee99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 2 deletions

View File

@ -55,6 +55,9 @@ struggle with virtual environments in their learning path. Creating a new direct
is still far easier than learning the details of virtual environments in various
platforms.
A major point for this PEP is that it is not trying to replace virtual environments.
If one needs all the features of virtual environments, they should use proper virtual
environments (for example, created using the :mod:`venv` module).
Specification
=============
@ -90,6 +93,12 @@ directory (empty or with e.g. a file like ``.gitignore``). After doing a fresh
check out the source code, a tool like ``pip`` can be used to install the
required dependencies directly into this directory.
But, this does not enable all features of virtual environments in a similar
fashion. For example, if the project has multiple scripts, or helper scripts
in a different directory to build the project, a normal virtual environment
should be preferred over ``__pypackages__``.
Example
-------
@ -177,6 +186,9 @@ For example, if we execute ``python /usr/share/myproject/fancy.py`` from the
``/usr/share/myproject/`` directory, it will be used. Any potential
``__pypackages__`` directory in ``/tmp`` will be ignored.
This also means we will not scan any parent directory while executing scripts.
If we want to execute scripts inside of the ``~/bin/`` directory, then
the ``__pypackages__`` directory must be inside of the ``~/bin/`` directory.
Backwards Compatibility
=======================
@ -201,8 +213,8 @@ enable the implementation for ``Cpython`` & in ``PyPy``.
Rejected Ideas
==============
``__pylocal__`` and ``python_modules``.
``__pylocal__`` and ``python_modules`` as directory name. We will also not
reimplement all the features of virtual environments.
Copyright
=========