配置#
颜色主题#
PDM 默认使用的主题如下:
Key |
默认风格 |
---|---|
|
cyan |
|
green |
|
yellow |
|
red |
|
blue |
|
bold green |
可以通过 pdm config
命令来检索和修改。例如,将 primary
颜色改为 magenta
:
pdm config theme.primary magenta
或者使用十六进制颜色代码:
pdm config theme.success '#51c7bd'
可用配置#
The following configuration items can be retrieved and modified by pdm config
command.
Config Item |
Description |
Default Value |
Available in Project |
Env var |
---|---|---|---|---|
|
Isolate the build environment from the project environment |
Yes |
True |
|
|
The root directory of cached files |
The default cache location on OS |
No |
|
|
Check if there is any newer version available |
True |
No |
|
|
Use the global project implicitly if no local project is found |
|
No |
|
|
If True show message when global project is used implicitly |
|
No |
|
|
The path to the global project |
|
No |
|
|
Whether to install to user site |
|
No |
|
|
Enable caching of wheel installations |
False |
Yes |
|
|
Specify how to create links to the caches( |
|
Yes |
|
|
Whether to perform installation and uninstallation in parallel |
|
Yes |
|
|
The max depth to search for a project through the parents |
5 |
No |
|
|
The Python interpreter path |
Yes |
|
|
|
Use the pyenv interpreter |
|
Yes |
|
|
Install packages into the activated venv site packages instead of PEP 582 |
|
Yes |
|
|
The URL of PyPI mirror |
|
Yes |
|
|
The username to access PyPI |
Yes |
|
|
|
The password to access PyPI |
Yes |
|
|
|
Ignore the configured indexes |
|
Yes |
|
|
Path to a PEM-encoded CA cert bundle (used for server cert verification) |
The CA certificates from certifi |
Yes |
|
|
Path to a PEM-encoded client cert and optional key |
Yes |
||
|
Path to a PEM-encoded client cert private key, if not in pypi.client_cert |
Yes |
||
|
Verify SSL certificate when query PyPI |
|
Yes |
|
|
Consult PyPI’s JSON API for package metadata |
|
Yes |
|
|
Specify how to save versions when a package is added |
|
Yes |
|
|
The default strategy for updating packages |
|
Yes |
|
|
Specify the max rounds of resolution process |
10000 |
Yes |
|
|
Parent directory for virtualenvs |
|
No |
|
|
Default backend to create virtualenv |
|
Yes |
|
|
Formatted string to be displayed in the prompt when virtualenv is active |
|
Yes |
|
|
Create virtualenv in |
|
Yes |
|
|
Install pip when creating a new venv |
|
Yes |
|
If the corresponding env var is set, the value will take precedence over what is saved in the config file.