本文整理汇总了Python中setuptools.command.sdist.sdist.add_defaults函数的典型用法代码示例。如果您正苦于以下问题:Python add_defaults函数的具体用法?Python add_defaults怎么用?Python add_defaults使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了add_defaults函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: add_defaults
def add_defaults(self):
sdist.add_defaults(self)
self.filelist.append(self.template)
self.filelist.append(self.manifest)
rcfiles = list(walk_revctrl())
if rcfiles:
self.filelist.extend(rcfiles)
elif os.path.exists(self.manifest):
self.read_manifest()
ei_cmd = self.get_finalized_command('egg_info')
self.filelist.include_pattern("*", prefix=ei_cmd.egg_info)
示例2: add_defaults
def add_defaults (self):
old_sdist.add_defaults(self)
dist = self.distribution
if dist.has_data_files():
for data in dist.data_files:
self.filelist.extend(get_data_files(data))
if dist.has_headers():
headers = []
for h in dist.headers:
if isinstance(h,str): headers.append(h)
else: headers.append(h[1])
self.filelist.extend(headers)
return
示例3: add_defaults
def add_defaults(self):
sdist.add_defaults(self)
self.filelist.append(self.template)
self.filelist.append(self.manifest)
rcfiles = list(walk_revctrl())
if rcfiles:
self.filelist.extend(rcfiles)
elif os.path.exists(self.manifest):
self.read_manifest()
if os.path.exists("setup.py"):
# setup.py should be included by default, even if it's not
# the script called to create the sdist
self.filelist.append("setup.py")
ei_cmd = self.get_finalized_command('egg_info')
self.filelist.graft(ei_cmd.egg_info)
示例4: add_defaults
def add_defaults(self):
_sdist.add_defaults(self)
try:
import py
except ImportError:
return
try:
svk = py.path.local.sysfind('svk').sysexec
except py.error.ENOENT:
return
try:
info = svk('info')
except py.process.cmdexec.Error:
return
depot = None
for line in info.splitlines():
if line.startswith('Depot Path'):
depot = line.split(': ')[-1]
break
if not depot:
return
start = len(depot) + 1
paths = [path[start:] for path in svk('ls', '-fR').splitlines()]
self.filelist.extend(paths)
示例5: add_defaults
def add_defaults(self):
"""Add shared_setup.py"""
sdist.add_defaults()
self.filelist.extend(find_extra_sdist_files())