Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
后端镜像
Pdm
提交
5d6b9b6a
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,发现更多精彩内容 >>
未验证
提交
5d6b9b6a
编写于
10月 13, 2020
作者:
F
Frost Ming
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix parallel installation
上级
a607fbbd
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
12 addition
and
9 deletion
+12
-9
.github/workflows/ci.yml
.github/workflows/ci.yml
+0
-1
pdm/cli/actions.py
pdm/cli/actions.py
+6
-2
pdm/models/builders.py
pdm/models/builders.py
+6
-6
未找到文件。
.github/workflows/ci.yml
浏览文件 @
5d6b9b6a
...
...
@@ -41,7 +41,6 @@ jobs:
pip install .
-
name
:
Install Dev Dependencies
run
:
|
pdm config set parallel_install false
pdm install -dvv
-
name
:
Run Tests
run
:
pdm run pytest -n auto tests
pdm/cli/actions.py
浏览文件 @
5d6b9b6a
...
...
@@ -337,9 +337,13 @@ def do_build(
shutil
.
rmtree
(
dest
,
ignore_errors
=
True
)
with
project
.
environment
.
activate
(
True
),
cd
(
project
.
root
),
stream
.
logging
(
"build"
):
if
sdist
:
build_sdist
(
"."
,
dest
)
stream
.
echo
(
"Building sdist..."
)
loc
=
build_sdist
(
"."
,
dest
)
stream
.
echo
(
f
"Built sdist at
{
loc
}
"
)
if
wheel
:
build_wheel
(
"."
,
dest
)
stream
.
echo
(
"Building wheel..."
)
loc
=
build_wheel
(
"."
,
dest
)
stream
.
echo
(
f
"Built wheel at
{
loc
}
"
)
def
do_init
(
...
...
pdm/models/builders.py
浏览文件 @
5d6b9b6a
...
...
@@ -23,6 +23,12 @@ _SETUPTOOLS_SHIM = (
class
IsolatedEnvironment
(
_Environment
):
"""A subclass of ``build.env.IsolatedEnvironment`` to provide rich output for PDM"""
def
__enter__
(
self
)
->
"IsolatedEnvironment"
:
inst
=
super
().
__enter__
()
# Setting PYTHONHOME will cause encoding initialization error in threads.
os
.
environ
.
pop
(
"PYTHONHOME"
,
None
)
return
inst
def
install
(
self
,
requirements
:
Iterable
[
str
])
->
None
:
if
not
requirements
:
return
...
...
@@ -64,26 +70,22 @@ def log_subprocessor(cmd, cwd=None, extra_environ=None):
def
build_wheel
(
src_dir
:
str
,
out_dir
:
str
)
->
str
:
"""Build wheel and return the full path of the artifact."""
builder
=
ProjectBuilder
(
srcdir
=
src_dir
)
stream
.
echo
(
"Building wheel..."
)
with
IsolatedEnvironment
.
for_current
()
as
env
,
builder
.
hook
.
subprocess_runner
(
log_subprocessor
):
env
.
install
(
builder
.
build_dependencies
)
filename
=
builder
.
hook
.
build_wheel
(
out_dir
)
stream
.
echo
(
f
"Built
{
filename
}
"
)
return
os
.
path
.
join
(
out_dir
,
filename
)
def
build_sdist
(
src_dir
:
str
,
out_dir
:
str
)
->
str
:
"""Build sdist and return the full path of the artifact."""
builder
=
ProjectBuilder
(
srcdir
=
src_dir
)
stream
.
echo
(
"Building sdist..."
)
with
IsolatedEnvironment
.
for_current
()
as
env
,
builder
.
hook
.
subprocess_runner
(
log_subprocessor
):
env
.
install
(
builder
.
build_dependencies
)
filename
=
builder
.
hook
.
build_sdist
(
out_dir
)
stream
.
echo
(
f
"Built
{
filename
}
"
)
return
os
.
path
.
join
(
out_dir
,
filename
)
...
...
@@ -105,8 +107,6 @@ def build_egg_info(src_dir: str, out_dir: str) -> str:
env
.
install
([
"setuptools"
])
args
=
[
sys
.
executable
,
"-c"
,
_SETUPTOOLS_SHIM
.
format
(
setup_py_path
)]
args
.
extend
([
"egg_info"
,
"--egg-base"
,
out_dir
])
stream
.
echo
(
"Building egg info..."
)
log_subprocessor
(
args
,
cwd
=
src_dir
)
filename
=
_find_egg_info
(
out_dir
)
stream
.
echo
(
f
"Built
{
filename
}
"
)
return
os
.
path
.
join
(
out_dir
,
filename
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录