Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
镜像
Python_Packaging_Authority
pip
提交
6a7b1a9f
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,发现更多精彩内容 >>
提交
6a7b1a9f
编写于
12月 10, 2009
作者:
C
Carl Meyer
浏览文件
操作
浏览文件
下载
差异文件
merge
上级
6ec86b9a
13a30830
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
118 addition
and
2 deletion
+118
-2
.hgignore
.hgignore
+2
-0
docs/news.txt
docs/news.txt
+3
-0
pip/commands/install.py
pip/commands/install.py
+1
-1
pip/req.py
pip/req.py
+19
-1
tests/packages/FSPkg/FSPkg.egg-info/PKG-INFO
tests/packages/FSPkg/FSPkg.egg-info/PKG-INFO
+11
-0
tests/packages/FSPkg/FSPkg.egg-info/SOURCES.txt
tests/packages/FSPkg/FSPkg.egg-info/SOURCES.txt
+9
-0
tests/packages/FSPkg/FSPkg.egg-info/dependency_links.txt
tests/packages/FSPkg/FSPkg.egg-info/dependency_links.txt
+1
-0
tests/packages/FSPkg/FSPkg.egg-info/entry_points.txt
tests/packages/FSPkg/FSPkg.egg-info/entry_points.txt
+3
-0
tests/packages/FSPkg/FSPkg.egg-info/not-zip-safe
tests/packages/FSPkg/FSPkg.egg-info/not-zip-safe
+1
-0
tests/packages/FSPkg/FSPkg.egg-info/top_level.txt
tests/packages/FSPkg/FSPkg.egg-info/top_level.txt
+1
-0
tests/packages/FSPkg/fspkg/__init__.py
tests/packages/FSPkg/fspkg/__init__.py
+1
-0
tests/packages/FSPkg/setup.cfg
tests/packages/FSPkg/setup.cfg
+3
-0
tests/packages/FSPkg/setup.py
tests/packages/FSPkg/setup.py
+26
-0
tests/test_bundle.txt
tests/test_bundle.txt
+37
-0
未找到文件。
.hgignore
浏览文件 @
6a7b1a9f
...
...
@@ -11,3 +11,5 @@ build/*
*.pyc
*.pyo
pip-log.txt
*.~
docs/news.txt
浏览文件 @
6a7b1a9f
...
...
@@ -16,6 +16,9 @@ hg tip
* Fixed an issue in the package finder that could result in an
infinite loop while looking for links.
* Fixed issue with ``pip bundle`` and local files (which weren't being
copied into the bundle), from Whit Morriss.
0.6
---
...
...
pip/commands/install.py
浏览文件 @
6a7b1a9f
...
...
@@ -152,7 +152,7 @@ class InstallCommand(Command):
for
filename
in
options
.
requirements
:
for
req
in
parse_requirements
(
filename
,
finder
=
finder
,
options
=
options
):
requirement_set
.
add_requirement
(
req
)
requirement_set
.
install_files
(
finder
,
force_root_egg_info
=
self
.
bundle
)
requirement_set
.
install_files
(
finder
,
force_root_egg_info
=
self
.
bundle
,
bundle
=
self
.
bundle
)
if
not
options
.
no_install
and
not
self
.
bundle
:
requirement_set
.
install
(
install_options
)
installed
=
' '
.
join
([
req
.
name
for
req
in
...
...
pip/req.py
浏览文件 @
6a7b1a9f
...
...
@@ -760,7 +760,7 @@ class RequirementSet(object):
req
.
uninstall
(
auto_confirm
=
auto_confirm
)
req
.
commit_uninstall
()
def
install_files
(
self
,
finder
,
force_root_egg_info
=
False
):
def
install_files
(
self
,
finder
,
force_root_egg_info
=
False
,
bundle
=
False
):
unnamed
=
list
(
self
.
unnamed_requirements
)
reqs
=
self
.
requirements
.
values
()
while
reqs
or
unnamed
:
...
...
@@ -806,6 +806,11 @@ class RequirementSet(object):
else
:
req_to_install
.
run_egg_info
()
elif
install
:
##@@ if filesystem packages are not marked
##editable in a req, a non deterministic error
##occurs when the script attempts to unpack the
##build directory
location
=
req_to_install
.
build_location
(
self
.
build_dir
,
not
self
.
is_download
)
## FIXME: is the existance of the checkout good enough to use it? I don't think so.
unpack
=
True
...
...
@@ -852,6 +857,9 @@ class RequirementSet(object):
f
=
open
(
req_to_install
.
delete_marker_filename
,
'w'
)
f
.
write
(
DELETE_MARKER_MESSAGE
)
f
.
close
()
#@@ sketchy way of identifying packages not grabbed from an index
if
bundle
and
req_to_install
.
url
:
self
.
copy_to_builddir
(
req_to_install
)
if
not
is_bundle
and
not
self
.
is_download
:
## FIXME: shouldn't be globally added:
finder
.
add_dependency_links
(
req_to_install
.
dependency_links
)
...
...
@@ -876,9 +884,19 @@ class RequirementSet(object):
req_to_install
.
remove_temporary_source
()
if
install
:
self
.
successfully_downloaded
.
append
(
req_to_install
)
if
bundle
and
(
req_to_install
.
url
and
req_to_install
.
url
.
startswith
(
'file:///'
)):
self
.
copy_to_builddir
(
req_to_install
)
finally
:
logger
.
indent
-=
2
def
copy_to_builddir
(
self
,
req_to_install
):
target_dir
=
req_to_install
.
editable
and
self
.
src_dir
or
self
.
build_dir
logger
.
info
(
"Copying %s to %s"
%
(
req_to_install
.
name
,
target_dir
))
dest
=
os
.
path
.
join
(
target_dir
,
req_to_install
.
name
)
shutil
.
copytree
(
req_to_install
.
source_dir
,
dest
)
shutil
.
copymode
(
req_to_install
.
source_dir
,
dest
)
call_subprocess
([
"python"
,
"%s/setup.py"
%
dest
,
"clean"
])
def
unpack_url
(
self
,
link
,
location
,
only_download
=
False
):
if
only_download
:
location
=
self
.
download_dir
...
...
tests/packages/FSPkg/FSPkg.egg-info/PKG-INFO
0 → 100644
浏览文件 @
6a7b1a9f
Metadata-Version: 1.0
Name: FSPkg
Version: 0.1dev
Summary: File system test package
Home-page: http://pip.openplans.org
Author: pip
Author-email: pip@openplans.org
License: UNKNOWN
Description: File system test package
Keywords: pip tests
Platform: UNKNOWN
tests/packages/FSPkg/FSPkg.egg-info/SOURCES.txt
0 → 100644
浏览文件 @
6a7b1a9f
setup.cfg
setup.py
FSPkg.egg-info/PKG-INFO
FSPkg.egg-info/SOURCES.txt
FSPkg.egg-info/dependency_links.txt
FSPkg.egg-info/entry_points.txt
FSPkg.egg-info/not-zip-safe
FSPkg.egg-info/top_level.txt
fspkg/__init__.py
\ No newline at end of file
tests/packages/FSPkg/FSPkg.egg-info/dependency_links.txt
0 → 100644
浏览文件 @
6a7b1a9f
tests/packages/FSPkg/FSPkg.egg-info/entry_points.txt
0 → 100644
浏览文件 @
6a7b1a9f
# -*- Entry points: -*-
\ No newline at end of file
tests/packages/FSPkg/FSPkg.egg-info/not-zip-safe
0 → 100644
浏览文件 @
6a7b1a9f
tests/packages/FSPkg/FSPkg.egg-info/top_level.txt
0 → 100644
浏览文件 @
6a7b1a9f
fspkg
tests/packages/FSPkg/fspkg/__init__.py
0 → 100644
浏览文件 @
6a7b1a9f
#
tests/packages/FSPkg/setup.cfg
0 → 100644
浏览文件 @
6a7b1a9f
[egg_info]
tag_build = dev
tag_svn_revision = true
tests/packages/FSPkg/setup.py
0 → 100644
浏览文件 @
6a7b1a9f
from
setuptools
import
setup
,
find_packages
import
sys
,
os
version
=
'0.1'
setup
(
name
=
'FSPkg'
,
version
=
version
,
description
=
"File system test package"
,
long_description
=
"""
\
File system test package"""
,
classifiers
=
[],
# Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
keywords
=
'pip tests'
,
author
=
'pip'
,
author_email
=
'pip@openplans.org'
,
url
=
'http://pip.openplans.org'
,
license
=
''
,
packages
=
find_packages
(
exclude
=
[
'ez_setup'
,
'examples'
,
'tests'
]),
include_package_data
=
True
,
zip_safe
=
False
,
install_requires
=
[
# -*- Extra requirements: -*-
],
entry_points
=
"""
# -*- Entry points: -*-
"""
,
)
tests/test_bundle.txt
0 → 100644
浏览文件 @
6a7b1a9f
Basic setup::
>>> from __main__ import here, reset_env, run_pip, pyversion, lib_py
>>> from __main__ import write_file
>>> from os.path import join
>>> import zipfile
>>> reset_env()
Test making a bundle. We'll grab one package from the filesystem (the
FSPkg dummy package), one from vcs (initools) and one from an index
(pip itself)::
>>> fspkg = 'file://%s/FSPkg' %join(here, 'packages')
>>> dummy = run_pip('install', '-e', fspkg)
>>> pkg_lines = '''-e %s\n''' %fspkg
>>> pkg_lines = pkg_lines + """
... -e svn+http://svn.colorstudy.com/INITools/trunk#egg=initools-dev
... pip"""
>>> write_file('bundle-req.txt', pkg_lines)
>>> result = run_pip('bundle', '-r', 'bundle-req.txt', 'test.pybundle')
>>> bundle = result.files_after.get('test.pybundle', None)
>>> bundle is not None
True
>>> files = zipfile.ZipFile(bundle.full).namelist()
>>> 'src/FSPkg/' in files
True
>>> 'src/initools/' in files
True
>>> 'build/pip/' in files
True
Cleanup::
>>> reset_env()
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录