Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
后端镜像
Pdm
提交
bfebf214
P
Pdm
项目概览
后端镜像
/
Pdm
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Pdm
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
bfebf214
编写于
11月 20, 2020
作者:
F
Frost Ming
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update docs
上级
4e3e68e2
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
19 addition
and
6 deletion
+19
-6
docs/docs/index.md
docs/docs/index.md
+8
-2
pdm/cli/actions.py
pdm/cli/actions.py
+2
-2
pdm/installers/synchronizers.py
pdm/installers/synchronizers.py
+2
-2
pdm/iostream.py
pdm/iostream.py
+7
-0
未找到文件。
docs/docs/index.md
浏览文件 @
bfebf214
...
...
@@ -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
\.
.
\C
ompletions
\p
dm_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.
...
...
pdm/cli/actions.py
浏览文件 @
bfebf214
...
...
@@ -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
...
...
pdm/installers/synchronizers.py
浏览文件 @
bfebf214
...
...
@@ -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
(
"
\n
All complete!"
)
stream
.
echo
(
f
"
\n
{
CELE
}
All complete!"
)
pdm/iostream.py
浏览文件 @
bfebf214
...
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录