@@ -288,31 +288,31 @@ creation according to their needs, the :class:`EnvBuilder` class.
288
288
The :class: `EnvBuilder ` class accepts the following keyword arguments on
289
289
instantiation:
290
290
291
- * `` system_site_packages `` -- a Boolean value indicating that the system Python
291
+ * * system_site_packages * -- a boolean value indicating that the system Python
292
292
site-packages should be available to the environment (defaults to ``False ``).
293
293
294
- * `` clear `` -- a Boolean value which, if true, will delete the contents of
294
+ * * clear * -- a boolean value which, if true, will delete the contents of
295
295
any existing target directory, before creating the environment.
296
296
297
- * `` symlinks `` -- a Boolean value indicating whether to attempt to symlink the
297
+ * * symlinks * -- a boolean value indicating whether to attempt to symlink the
298
298
Python binary rather than copying.
299
299
300
- * `` upgrade `` -- a Boolean value which, if true, will upgrade an existing
300
+ * * upgrade * -- a boolean value which, if true, will upgrade an existing
301
301
environment with the running Python - for use when that Python has been
302
302
upgraded in-place (defaults to ``False ``).
303
303
304
- * `` with_pip `` -- a Boolean value which, if true, ensures pip is
304
+ * * with_pip * -- a boolean value which, if true, ensures pip is
305
305
installed in the virtual environment. This uses :mod: `ensurepip ` with
306
306
the ``--default-pip `` option.
307
307
308
- * `` prompt `` -- a String to be used after virtual environment is activated
308
+ * * prompt * -- a string to be used after virtual environment is activated
309
309
(defaults to ``None `` which means directory name of the environment would
310
310
be used). If the special string ``"." `` is provided, the basename of the
311
311
current directory is used as the prompt.
312
312
313
- * `` upgrade_deps `` -- Update the base venv modules to the latest on PyPI
313
+ * * upgrade_deps * -- Update the base venv modules to the latest on PyPI
314
314
315
- * `` scm_ignore_files `` -- Create ignore files based for the specified source
315
+ * * scm_ignore_files * -- Create ignore files based for the specified source
316
316
control managers (SCM) in the iterable. Support is defined by having a
317
317
method named ``create_{scm}_ignore_file ``. The only value supported by
318
318
default is ``"git" `` via :meth: `create_git_ignore_file `.
@@ -330,10 +330,7 @@ creation according to their needs, the :class:`EnvBuilder` class.
330
330
.. versionchanged :: 3.13
331
331
Added the ``scm_ignore_files `` parameter
332
332
333
- Creators of third-party virtual environment tools will be free to use the
334
- provided :class: `EnvBuilder ` class as a base class.
335
-
336
- The returned env-builder is an object which has a method, ``create ``:
333
+ :class: `EnvBuilder ` may be used as a base class.
337
334
338
335
.. method :: create(env_dir)
339
336
@@ -433,37 +430,27 @@ creation according to their needs, the :class:`EnvBuilder` class.
433
430
434
431
.. method :: upgrade_dependencies(context)
435
432
436
- Upgrades the core venv dependency packages (currently `` pip ` `)
433
+ Upgrades the core venv dependency packages (currently :pypi: ` pip `)
437
434
in the environment. This is done by shelling out to the
438
435
``pip `` executable in the environment.
439
436
440
437
.. versionadded :: 3.9
441
438
.. versionchanged :: 3.12
442
439
443
- `` setuptools ` ` is no longer a core venv dependency.
440
+ :pypi: ` setuptools ` is no longer a core venv dependency.
444
441
445
442
.. method :: post_setup(context)
446
443
447
444
A placeholder method which can be overridden in third party
448
445
implementations to pre-install packages in the virtual environment or
449
446
perform other post-creation steps.
450
447
451
- .. versionchanged :: 3.7.2
452
- Windows now uses redirector scripts for ``python[w].exe `` instead of
453
- copying the actual binaries. In 3.7.2 only :meth: `setup_python ` does
454
- nothing unless running from a build in the source tree.
455
-
456
- .. versionchanged :: 3.7.3
457
- Windows copies the redirector scripts as part of :meth: `setup_python `
458
- instead of :meth: `setup_scripts `. This was not the case in 3.7.2.
459
- When using symlinks, the original executables will be linked.
460
-
461
- In addition, :class: `EnvBuilder ` provides this utility method that can be
462
- called from :meth: `setup_scripts ` or :meth: `post_setup ` in subclasses to
463
- assist in installing custom scripts into the virtual environment.
464
-
465
448
.. method :: install_scripts(context, path)
466
449
450
+ This method can be
451
+ called from :meth: `setup_scripts ` or :meth: `post_setup ` in subclasses to
452
+ assist in installing custom scripts into the virtual environment.
453
+
467
454
*path * is the path to a directory that should contain subdirectories
468
455
``common ``, ``posix ``, ``nt ``; each containing scripts destined for the
469
456
``bin `` directory in the environment. The contents of ``common `` and the
@@ -495,6 +482,16 @@ creation according to their needs, the :class:`EnvBuilder` class.
495
482
496
483
.. versionadded :: 3.13
497
484
485
+ .. versionchanged :: 3.7.2
486
+ Windows now uses redirector scripts for ``python[w].exe `` instead of
487
+ copying the actual binaries. In 3.7.2 only :meth: `setup_python ` does
488
+ nothing unless running from a build in the source tree.
489
+
490
+ .. versionchanged :: 3.7.3
491
+ Windows copies the redirector scripts as part of :meth: `setup_python `
492
+ instead of :meth: `setup_scripts `. This was not the case in 3.7.2.
493
+ When using symlinks, the original executables will be linked.
494
+
498
495
There is also a module-level convenience function:
499
496
500
497
.. function :: create(env_dir, system_site_packages=False, clear=False, \
0 commit comments