@@ -177,6 +177,45 @@ creation according to their needs, the :class:`EnvBuilder` class.
177
177
``clear=True ``, contents of the environment directory will be cleared
178
178
and then all necessary subdirectories will be recreated.
179
179
180
+ The returned context object is a :class: `types.SimpleNamespace ` with the
181
+ following attributes:
182
+
183
+ * ``env_dir `` - The location of the virtual environment. Used for
184
+ ``__VENV_DIR__ `` in activation scripts (see :meth: `install_scripts `).
185
+
186
+ * ``env_name `` - The name of the virtual environment. Used for
187
+ ``__VENV_NAME__ `` in activation scripts (see :meth: `install_scripts `).
188
+
189
+ * ``prompt `` - The prompt to be used by the activation scripts. Used for
190
+ ``__VENV_PROMPT__ `` in activation scripts (see :meth: `install_scripts `).
191
+
192
+ * ``executable `` - The underlying Python executable used by the virtual
193
+ environment. This takes into account the case where a virtual environment
194
+ is created from another virtual environment.
195
+
196
+ * ``inc_path `` - The include path for the virtual environment.
197
+
198
+ * ``lib_path `` - The purelib path for the virtual environment.
199
+
200
+ * ``bin_path `` - The script path for the virtual environment.
201
+
202
+ * ``bin_name `` - The name of the script path relative to the virtual
203
+ environment location. Used for ``__VENV_BIN_NAME__ `` in activation
204
+ scripts (see :meth: `install_scripts `).
205
+
206
+ * ``env_exe `` - The name of the Python interpreter in the virtual
207
+ environment. Used for ``__VENV_PYTHON__ `` in activation scripts
208
+ (see :meth: `install_scripts `).
209
+
210
+ * ``env_exec_cmd `` - The name of the Python interpreter, taking into
211
+ account filesystem redirections. This can be used to run Python in
212
+ the virtual environment.
213
+
214
+
215
+ .. versionchanged :: 3.12
216
+ The attribute ``lib_path `` was added to the context, and the context
217
+ object was documented.
218
+
180
219
.. versionchanged :: 3.11
181
220
The *venv *
182
221
:ref: `sysconfig installation scheme <installation_paths >`
0 commit comments