Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
镜像
Python_Packaging_Authority
pip
提交
33f48e2b
P
pip
项目概览
镜像
/
Python_Packaging_Authority
/
pip
12 个月 前同步成功
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
pip
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
33f48e2b
编写于
12月 22, 2020
作者:
H
Hugo van Kemenade
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Replace more six
上级
817ee230
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
6 addition
and
10 deletion
+6
-10
src/pip/_internal/pyproject.py
src/pip/_internal/pyproject.py
+2
-2
src/pip/_internal/req/req_install.py
src/pip/_internal/req/req_install.py
+2
-2
tests/lib/venv.py
tests/lib/venv.py
+2
-6
未找到文件。
src/pip/_internal/pyproject.py
浏览文件 @
33f48e2b
...
@@ -4,7 +4,7 @@ import io
...
@@ -4,7 +4,7 @@ import io
import
os
import
os
from
collections
import
namedtuple
from
collections
import
namedtuple
from
pip._vendor
import
six
,
toml
from
pip._vendor
import
toml
from
pip._vendor.packaging.requirements
import
InvalidRequirement
,
Requirement
from
pip._vendor.packaging.requirements
import
InvalidRequirement
,
Requirement
from
pip._internal.exceptions
import
InstallationError
from
pip._internal.exceptions
import
InstallationError
...
@@ -18,7 +18,7 @@ def _is_list_of_str(obj):
...
@@ -18,7 +18,7 @@ def _is_list_of_str(obj):
# type: (Any) -> bool
# type: (Any) -> bool
return
(
return
(
isinstance
(
obj
,
list
)
and
isinstance
(
obj
,
list
)
and
all
(
isinstance
(
item
,
s
ix
.
string_types
)
for
item
in
obj
)
all
(
isinstance
(
item
,
s
tr
)
for
item
in
obj
)
)
)
...
...
src/pip/_internal/req/req_install.py
浏览文件 @
33f48e2b
...
@@ -223,7 +223,7 @@ class InstallRequirement(object):
...
@@ -223,7 +223,7 @@ class InstallRequirement(object):
if
self
.
satisfied_by
is
not
None
:
if
self
.
satisfied_by
is
not
None
:
s
+=
' in {}'
.
format
(
display_path
(
self
.
satisfied_by
.
location
))
s
+=
' in {}'
.
format
(
display_path
(
self
.
satisfied_by
.
location
))
if
self
.
comes_from
:
if
self
.
comes_from
:
if
isinstance
(
self
.
comes_from
,
s
ix
.
string_types
):
if
isinstance
(
self
.
comes_from
,
s
tr
):
comes_from
=
self
.
comes_from
# type: Optional[str]
comes_from
=
self
.
comes_from
# type: Optional[str]
else
:
else
:
comes_from
=
self
.
comes_from
.
from_path
()
comes_from
=
self
.
comes_from
.
from_path
()
...
@@ -334,7 +334,7 @@ class InstallRequirement(object):
...
@@ -334,7 +334,7 @@ class InstallRequirement(object):
return
None
return
None
s
=
str
(
self
.
req
)
s
=
str
(
self
.
req
)
if
self
.
comes_from
:
if
self
.
comes_from
:
if
isinstance
(
self
.
comes_from
,
s
ix
.
string_types
):
if
isinstance
(
self
.
comes_from
,
s
tr
):
comes_from
=
self
.
comes_from
comes_from
=
self
.
comes_from
else
:
else
:
comes_from
=
self
.
comes_from
.
from_path
()
comes_from
=
self
.
comes_from
.
from_path
()
...
...
tests/lib/venv.py
浏览文件 @
33f48e2b
...
@@ -4,15 +4,12 @@ import compileall
...
@@ -4,15 +4,12 @@ import compileall
import
shutil
import
shutil
import
sys
import
sys
import
textwrap
import
textwrap
import
venv
as
_venv
import
six
import
virtualenv
as
_virtualenv
import
virtualenv
as
_virtualenv
from
.path
import
Path
from
.path
import
Path
if
six
.
PY3
:
import
venv
as
_venv
class
VirtualEnvironment
(
object
):
class
VirtualEnvironment
(
object
):
"""
"""
...
@@ -37,8 +34,7 @@ class VirtualEnvironment(object):
...
@@ -37,8 +34,7 @@ class VirtualEnvironment(object):
self
.
site
=
Path
(
lib
)
/
'site-packages'
self
.
site
=
Path
(
lib
)
/
'site-packages'
# Workaround for https://github.com/pypa/virtualenv/issues/306
# Workaround for https://github.com/pypa/virtualenv/issues/306
if
hasattr
(
sys
,
"pypy_version_info"
):
if
hasattr
(
sys
,
"pypy_version_info"
):
version_fmt
=
'{0}'
if
six
.
PY3
else
'{0}.{1}'
version_dir
=
'{0}'
.
format
(
*
sys
.
version_info
)
version_dir
=
version_fmt
.
format
(
*
sys
.
version_info
)
self
.
lib
=
Path
(
home
,
'lib-python'
,
version_dir
)
self
.
lib
=
Path
(
home
,
'lib-python'
,
version_dir
)
else
:
else
:
self
.
lib
=
Path
(
lib
)
self
.
lib
=
Path
(
lib
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录