Skip to content

Commit

Permalink
add news and update the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
frostming committed Mar 22, 2022
1 parent 5972131 commit 2e349ec
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion docs/docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ The following configuration items can be retrieved and modified by `pdm config`

| Config Item | Description | Default Value | Available in Project | Env var |
| ----------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -------------------- | ------------------------ |
| `auto_global` | Use global package implicitly if no local project is found | `False` | No | `PDM_AUTO_GLOBAL` |
| `build_isolation` | Isolate the build environment from the project environment | Yes | True | `PDM_BUILD_ISOLATION` |
| `cache_dir` | The root directory of cached files | The default cache location on OS | No | |
| `check_update` | Check if there is any newer version available | True | No | |
| `global_project.fallback` | Use the global project implicitly if no local project is found | `False` | No | |
| `global_project.path` | The path to the global project | `~/.pdm/global-project` | No | |
| `install.cache` | Enable caching of wheel installations | False | Yes | |
| `install.cache_method` | Specify how to create links to the caches(`symlink` or `pth`) | `symlink` | Yes | |
| `install.parallel` | Whether to perform installation and uninstallation in parallel | `True` | Yes | `PDM_PARALLEL_INSTALL` |
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/usage/project.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ and it doesn't support build features. The idea is taken from Haskell's [stack](

However, unlike `stack`, by default, PDM won't use global project automatically if a local project is not found.
Users should pass `-g/--global` explicitly to activate it, since it is not very pleasing if packages go to a wrong place.
But PDM also leave the decision to users, just set the config `auto_global` to `true`.
But PDM also leave the decision to users, just set the config `global_project.fallback` to `true`.

If you want global project to track another project file other than `~/.pdm/global-project`, you can provide the
project path via `-p/--project <path>` option.
Expand Down
1 change: 1 addition & 0 deletions news/986.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Make the path to the global project configurable. Rename the configuration `auto_global` to `global_project.fallback` and deprecate the old name.
3 changes: 2 additions & 1 deletion pdm/project/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class Config(MutableMapping[str, str]):
ensure_boolean,
),
"global_project.fallback": ConfigItem(
"Use global package implicitly if no local project is found",
"Use the global project implicitly if no local project is found",
False,
True,
coerce=ensure_boolean,
Expand All @@ -103,6 +103,7 @@ class Config(MutableMapping[str, str]):
"global_project.path": ConfigItem(
"The path to the global project",
os.path.expanduser("~/.pdm/global-project"),
True,
),
"project_max_depth": ConfigItem(
"The max depth to search for a project through the parents",
Expand Down

0 comments on commit 2e349ec

Please sign in to comment.