未验证 提交 bfebf214 编写于 作者: F Frost Ming

Update docs

上级 4e3e68e2
......@@ -18,8 +18,8 @@ in a similar way to `npm` that doesn't need to create a virtualenv at all!
PDM requires Python 3.7+ to be installed. It works on multiple platforms including Windows, Linux and MacOS.
!!! note
There is no restriction about what Python version that your project is using but installing
PDM itself needs Python 3.7+.
There is no restriction about what Python version that your project is using but installing
PDM itself needs Python 3.7+.
### Recommended installation method
......@@ -90,6 +90,12 @@ PS > Set-ExecutionPolicy Unrestricted -Scope CurrentUser
PS > pdm completion powershell | Out-File -Encoding utf8 $PROFILE\..\Completions\pdm_completion.ps1
```
## Unicode and ANSI supports
PDM provides a fancy terminal UI with the help of ANSI characters and unicode emojis.
It can turn on/off automitically depending on whether it is supported on your terminal.
Otherwise if you see any garbled characters, set env var `DISABLE_UNICODE_OUTPUT=1` to turn off it.
## Use with IDE
Now there are not built-in support or plugins for PEP 582 in most IDEs, you have to configure your tools manually.
......
......@@ -19,7 +19,7 @@ from pdm.cli.utils import (
from pdm.exceptions import NoPythonVersion, PdmUsageError, ProjectError
from pdm.formats import FORMATS
from pdm.installers.installers import format_dist
from pdm.iostream import stream
from pdm.iostream import LOCK, stream
from pdm.models.builders import EnvBuilder
from pdm.models.candidates import Candidate
from pdm.models.requirements import Requirement, parse_requirement, strip_extras
......@@ -62,7 +62,7 @@ def do_lock(
resolver, requirements, project.environment.python_requires
)
data = format_lockfile(mapping, dependencies, summaries)
spin.succeed("Resolution succeeds")
spin.succeed(f"{LOCK} Lock successful")
project.write_lockfile(data)
return mapping
......
......@@ -9,7 +9,7 @@ from pip._vendor.pkg_resources import Distribution, safe_name
from pdm.exceptions import InstallationError
from pdm.installers.installers import Installer, is_dist_editable
from pdm.iostream import stream
from pdm.iostream import CELE, stream
from pdm.models.candidates import Candidate
from pdm.models.environment import Environment
from pdm.models.requirements import strip_extras
......@@ -307,4 +307,4 @@ class Synchronizer:
stream.echo("Installing the project as an editable package...")
with stream.indent(" "):
handlers[install_self[0]](install_self[1])
stream.echo("\nAll complete!")
stream.echo(f"\n{CELE} All complete!")
......@@ -12,6 +12,7 @@ from typing import List, Optional
import click
from pdm._vendor import halo
from pdm._vendor.log_symbols.symbols import is_supported as supports_unicode
from pdm.utils import cached_property
COLORS = ("red", "green", "yellow", "blue", "black", "magenta", "cyan", "white")
......@@ -158,3 +159,9 @@ class IOStream:
stream = IOStream()
if supports_unicode():
CELE = "🎉"
LOCK = "🔒"
else:
CELE = ""
LOCK = ""
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册