Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
镜像
Python_Packaging_Authority
pip
提交
c6aa0bd4
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,发现更多精彩内容 >>
提交
c6aa0bd4
编写于
4月 16, 2010
作者:
C
Carl Meyer
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ignore -f, -i, etc when uninstalling from reqs file
上级
c8798a28
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
15 addition
and
5 deletion
+15
-5
pip/req.py
pip/req.py
+4
-4
tests/test_uninstall.py
tests/test_uninstall.py
+11
-1
未找到文件。
pip/req.py
浏览文件 @
c6aa0bd4
...
...
@@ -1345,23 +1345,23 @@ def parse_requirements(filename, finder=None, comes_from=None, options=None):
# No longer used, but previously these were used in
# requirement files, so we'll ignore.
pass
elif
finder
and
line
.
startswith
(
'-f'
)
or
line
.
startswith
(
'--find-links'
):
elif
line
.
startswith
(
'-f'
)
or
line
.
startswith
(
'--find-links'
):
if
line
.
startswith
(
'-f'
):
line
=
line
[
2
:].
strip
()
else
:
line
=
line
[
len
(
'--find-links'
):].
strip
().
lstrip
(
'='
)
## FIXME: it would be nice to keep track of the source of
## the find_links:
finder
.
find_links
.
append
(
line
)
if
finder
:
finder
.
find_links
.
append
(
line
)
elif
line
.
startswith
(
'-i'
)
or
line
.
startswith
(
'--index-url'
):
if
line
.
startswith
(
'-i'
):
line
=
line
[
2
:].
strip
()
else
:
line
=
line
[
len
(
'--index-url'
):].
strip
().
lstrip
(
'='
)
finder
.
index_urls
=
[
line
]
if
finder
:
finder
.
index_urls
=
[
line
]
elif
line
.
startswith
(
'--extra-index-url'
):
line
=
line
[
len
(
'--extra-index-url'
):].
strip
().
lstrip
(
'='
)
finder
.
index_urls
.
append
(
line
)
if
finder
:
finder
.
index_urls
.
append
(
line
)
else
:
comes_from
=
'-r %s (line %s)'
%
(
filename
,
line_number
)
if
line
.
startswith
(
'-e'
)
or
line
.
startswith
(
'--editable'
):
...
...
tests/test_uninstall.py
浏览文件 @
c6aa0bd4
...
...
@@ -115,7 +115,17 @@ def test_uninstall_from_reqs_file():
PyLogo<0.4
"""
))
result
=
run_pip
(
'install'
,
'-r'
,
'test-req.txt'
)
write_file
(
'test-req.txt'
,
textwrap
.
dedent
(
"""
\
# -f, -i, and --extra-index-url should all be ignored by uninstall
-f http://www.example.com
-i http://www.example.com
--extra-index-url http://www.example.com
-e svn+http://svn.colorstudy.com/INITools/trunk#egg=initools-dev
# and something else to test out:
PyLogo<0.4
"""
))
result2
=
run_pip
(
'uninstall'
,
'-r'
,
'test-req.txt'
,
'-y'
)
diff
=
diff_states
(
result
.
files_before
,
result2
.
files_after
,
ignore
=
[
'build'
,
'src'
]).
values
()
diff
=
diff_states
(
result
.
files_before
,
result2
.
files_after
,
ignore
=
[
'build'
,
'src'
,
'test-req.txt'
]).
values
()
assert
diff
==
[{},
{},
{}],
diff
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录