Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
后端镜像
Pdm
提交
b18df098
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,发现更多精彩内容 >>
未验证
提交
b18df098
编写于
3月 25, 2020
作者:
F
frostming
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix a bug
上级
6e6d594f
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
17 addition
and
5 deletion
+17
-5
news/83.bugfix
news/83.bugfix
+1
-0
pdm/installers.py
pdm/installers.py
+16
-5
未找到文件。
news/83.bugfix
0 → 100644
浏览文件 @
b18df098
Fix a bug that parallel installation fails due to setuptools reinstalling.
pdm/installers.py
浏览文件 @
b18df098
...
...
@@ -384,6 +384,7 @@ class Synchronizer:
BAR_FILLED_CHAR
=
"="
if
os
.
name
==
"nt"
else
"▉"
BAR_EMPTY_CHAR
=
" "
RETRY_TIMES
=
1
SEQUENTIAL_PACKAGES
=
(
"pip"
,
"setuptools"
,
"wheel"
)
def
__init__
(
self
,
candidates
:
Dict
[
str
,
Candidate
],
environment
:
Environment
,
...
...
@@ -550,15 +551,20 @@ class Synchronizer:
with
self
.
progressbar
(
"Synchronizing:"
,
sum
(
len
(
l
)
for
l
in
to_do
.
values
())
)
as
(
bar
,
pool
):
for
section
in
to_do
:
for
key
in
to_do
[
section
]:
# First update packages, then remove and add
for
section
in
reversed
(
to_do
):
# setup toolkits are installed sequentially before other packages.
for
key
in
sorted
(
to_do
[
section
],
key
=
lambda
x
:
x
not
in
self
.
SEQUENTIAL_PACKAGES
):
future
=
pool
.
submit
(
handlers
[
section
],
key
)
future
.
add_done_callback
(
functools
.
partial
(
update_progress
,
section
=
section
,
key
=
key
,
bar
=
bar
)
)
if
key
in
self
.
SEQUENTIAL_PACKAGES
:
future
.
result
()
# Retry for failed items
for
i
in
range
(
self
.
RETRY_TIMES
):
...
...
@@ -575,14 +581,19 @@ class Synchronizer:
sum
(
len
(
l
)
for
l
in
to_do
.
values
()),
)
as
(
bar
,
pool
):
for
section
in
to_do
:
for
key
in
to_do
[
section
]:
for
section
in
reversed
(
to_do
):
for
key
in
sorted
(
to_do
[
section
],
key
=
lambda
x
:
x
not
in
self
.
SEQUENTIAL_PACKAGES
,
):
future
=
pool
.
submit
(
handlers
[
section
],
key
)
future
.
add_done_callback
(
functools
.
partial
(
update_progress
,
section
=
section
,
key
=
key
,
bar
=
bar
)
)
if
key
in
self
.
SEQUENTIAL_PACKAGES
:
future
.
result
()
# End installation
self
.
summarize
(
result
)
if
not
any
(
failed
.
values
()):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录