Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
镜像
Python_Packaging_Authority
pip
提交
856fddfe
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,发现更多精彩内容 >>
提交
856fddfe
编写于
10月 01, 2009
作者:
I
Ian Bicking
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix a weird little case with redirects and extensions and guessing compression types
上级
3544f6ec
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
12 addition
and
2 deletion
+12
-2
docs/news.txt
docs/news.txt
+4
-0
pip.py
pip.py
+8
-2
未找到文件。
docs/news.txt
浏览文件 @
856fddfe
...
...
@@ -29,6 +29,10 @@ tip
* Reduced the amount of console log messages when fetching a page to find a
distribution was problematic. The full messages can be found in pip-log.txt.
* When downloading a file from a redirect, use the redirected
location's extension to guess the compression (happens specifically
when redirecting to a bitbucket.org tip.gz file).
0.4
---
...
...
pip.py
浏览文件 @
856fddfe
...
...
@@ -1472,7 +1472,8 @@ def replacement_run(self):
for ep in egg_info.iter_entry_points('egg_info.writers'):
# require=False is the change we're making:
writer = ep.load(require=False)
writer(self, ep.name, egg_info.os.path.join(self.egg_info,ep.name))
if writer:
writer(self, ep.name, egg_info.os.path.join(self.egg_info,ep.name))
self.find_sources()
egg_info.egg_info.run = replacement_run
execfile(__file__)
...
...
@@ -1508,6 +1509,7 @@ execfile(__file__)
filenames
.
extend
([
os
.
path
.
join
(
root
,
dir
)
for
dir
in
dirs
])
filenames
=
[
f
for
f
in
filenames
if
f
.
endswith
(
'.egg-info'
)]
assert
filenames
,
"No files/directories in %s (from %s)"
%
(
base
,
filename
)
assert
len
(
filenames
)
==
1
,
"Unexpected files/directories in %s: %s"
%
(
base
,
' '
.
join
(
filenames
))
self
.
_egg_info_path
=
os
.
path
.
join
(
base
,
filenames
[
0
])
return
os
.
path
.
join
(
self
.
_egg_info_path
,
filename
)
...
...
@@ -2013,10 +2015,14 @@ class RequirementSet(object):
raise
content_type
=
resp
.
info
()[
'content-type'
]
filename
=
link
.
filename
ext
=
splitext
(
filename
)
ext
=
splitext
(
filename
)
[
1
]
if
not
ext
:
ext
=
mimetypes
.
guess_extension
(
content_type
)
filename
+=
ext
if
not
ext
and
link
.
url
!=
resp
.
geturl
():
ext
=
os
.
path
.
splitext
(
resp
.
geturl
())
if
ext
:
filename
+=
ext
temp_location
=
os
.
path
.
join
(
dir
,
filename
)
fp
=
open
(
temp_location
,
'wb'
)
if
md5_hash
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录