From 00b3127b7c84db187d850b395052c3fefff1dc4a Mon Sep 17 00:00:00 2001 From: Kushal Das Date: Wed, 25 Jan 2023 20:00:43 +0100 Subject: [PATCH 1/2] Updates based on feedback Adds explanation of handling `bin/` directory, or how we are not trying to replace the existing virtual environments. --- pep-0582.rst | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/pep-0582.rst b/pep-0582.rst index 6ce6977f309..9d938a61aa2 100644 --- a/pep-0582.rst +++ b/pep-0582.rst @@ -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 (example, created using venv module). Specification ============= @@ -90,6 +93,13 @@ 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 the similar +fashion. For example, if the project has multiple scripts, or helper scripts +in a different directory to build the project, instead of using +``__pypackages__`` using a normal virtual environment should be the preferred +method. + + Example ------- @@ -177,6 +187,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 any +script. If we want to execute scripts inside of ``~/bin/`` directory, then +the ``__pypackages__`` directory must be inside of ``~/bin/`` directory. Backwards Compatibility ======================= @@ -201,8 +214,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 ========= From b3335ba5a3d18fd1d48eb46434ba4fe38f12e137 Mon Sep 17 00:00:00 2001 From: Kushal Das Date: Thu, 26 Jan 2023 10:46:14 +0100 Subject: [PATCH 2/2] Updates grammar based on feedback --- pep-0582.rst | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pep-0582.rst b/pep-0582.rst index 9d938a61aa2..e0036c5396e 100644 --- a/pep-0582.rst +++ b/pep-0582.rst @@ -57,7 +57,7 @@ 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 (example, created using venv module). +environments (for example, created using the :mod:`venv` module). Specification ============= @@ -93,11 +93,10 @@ 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 the similar +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, instead of using -``__pypackages__`` using a normal virtual environment should be the preferred -method. +in a different directory to build the project, a normal virtual environment +should be preferred over ``__pypackages__``. Example @@ -187,9 +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 any -script. If we want to execute scripts inside of ``~/bin/`` directory, then -the ``__pypackages__`` directory must be inside of ``~/bin/`` directory. +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 =======================