summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorPhil Elson <philip.elson@cern.ch>2022-10-05 18:19:28 +0200
committerPhil Elson <philip.elson@cern.ch>2022-10-06 09:33:38 +0200
commitb777bcda819961092ae87ca7512e0b27c576d19c (patch)
treef2bbf49292d3828fa54029435272ee5da78d652b /docs
parente6e7c12b6dfbf520bcabed243071abaaaac00d44 (diff)
downloadpip-b777bcda819961092ae87ca7512e0b27c576d19c.tar.gz
Add the "base" config level concept, to allow configuration of all virtual environments sharing the same base.
The new functionality serves a use case which was not previously possible with pip configuration files, namely the situation where you have a base Python installation and want to influence the pip configuration for all derivative virtual environments *without* changing the config for all other environments on a machine (global), or for all other environment run by the same user (user). Concretely, this could be used for a centrally managed network mounted filesystem based Python installation, from which multiple users can build virtual environments and inside which a specific pip configuration is needed (e.g. an index URL).
Diffstat (limited to 'docs')
-rw-r--r--docs/html/topics/configuration.md27
1 files changed, 19 insertions, 8 deletions
diff --git a/docs/html/topics/configuration.md b/docs/html/topics/configuration.md
index e4aafcd2b..c544d0c70 100644
--- a/docs/html/topics/configuration.md
+++ b/docs/html/topics/configuration.md
@@ -19,13 +19,14 @@ and how they are related to pip's various command line options.
## Configuration Files
-Configuration files can change the default values for command line option.
-They are written using a standard INI style configuration files.
+Configuration files can change the default values for command line options.
+They are written using standard INI style configuration files.
-pip has 3 "levels" of configuration files:
+pip has 4 "levels" of configuration files:
-- `global`: system-wide configuration file, shared across users.
-- `user`: per-user configuration file.
+- `global`: system-wide configuration file, shared across all users.
+- `user`: per-user configuration file, shared across all environments.
+- `base` : per-base environment configuration file, shared across all virtualenvs with the same base. (added in pip `v23`)
- `site`: per-environment configuration file; i.e. per-virtualenv.
### Location
@@ -47,8 +48,11 @@ User
The legacy "per-user" configuration file is also loaded, if it exists: {file}`$HOME/.pip/pip.conf`.
+Base
+: {file}`\{sys.base_prefix\}/pip.conf`
+
Site
-: {file}`$VIRTUAL_ENV/pip.conf`
+: {file}`\{sys.prefix\}/pip.conf`
```
```{tab} MacOS
@@ -63,8 +67,11 @@ User
The legacy "per-user" configuration file is also loaded, if it exists: {file}`$HOME/.pip/pip.conf`.
+Base
+: {file}`\{sys.base_prefix\}/pip.conf`
+
Site
-: {file}`$VIRTUAL_ENV/pip.conf`
+: {file}`\{sys.prefix\}/pip.conf`
```
```{tab} Windows
@@ -81,8 +88,11 @@ User
The legacy "per-user" configuration file is also loaded, if it exists: {file}`%HOME%\\pip\\pip.ini`
+Base
+: {file}`\{sys.base_prefix\}\\pip.ini`
+
Site
-: {file}`%VIRTUAL_ENV%\\pip.ini`
+: {file}`\{sys.prefix\}\\pip.ini`
```
### `PIP_CONFIG_FILE`
@@ -102,6 +112,7 @@ order:
- `PIP_CONFIG_FILE`, if given.
- Global
- User
+- Base
- Site
Each file read overrides any values read from previous files, so if the