当前位置: 首页>>代码示例>>Python>>正文


Python sdist.add_defaults方法代码示例

本文整理汇总了Python中setuptools.command.sdist.sdist.add_defaults方法的典型用法代码示例。如果您正苦于以下问题:Python sdist.add_defaults方法的具体用法?Python sdist.add_defaults怎么用?Python sdist.add_defaults使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在setuptools.command.sdist.sdist的用法示例。


在下文中一共展示了sdist.add_defaults方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: add_defaults

# 需要导入模块: from setuptools.command.sdist import sdist [as 别名]
# 或者: from setuptools.command.sdist.sdist import add_defaults [as 别名]
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 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:19,代码来源:sdist.py

示例2: write_manifest

# 需要导入模块: from setuptools.command.sdist import sdist [as 别名]
# 或者: from setuptools.command.sdist.sdist import add_defaults [as 别名]
def write_manifest(self):
        """Write the file list in 'self.filelist' (presumably as filled in
        by 'add_defaults()' and 'read_template()') to the manifest file
        named by 'self.manifest'.
        """
        # The manifest must be UTF-8 encodable. See #303.
        if sys.version_info >= (3,):
            files = []
            for file in self.filelist.files:
                try:
                    file.encode("utf-8")
                except UnicodeEncodeError:
                    log.warn("'%s' not UTF-8 encodable -- skipping" % file)
                else:
                    files.append(file)
            self.filelist.files = files

        files = self.filelist.files
        if os.sep!='/':
            files = [f.replace(os.sep,'/') for f in files]
        self.execute(write_file, (self.manifest, files),
                     "writing manifest file '%s'" % self.manifest) 
开发者ID:MayOneUS,项目名称:pledgeservice,代码行数:24,代码来源:egg_info.py

示例3: add_defaults

# 需要导入模块: from setuptools.command.sdist import sdist [as 别名]
# 或者: from setuptools.command.sdist.sdist import add_defaults [as 别名]
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) 
开发者ID:ryfeus,项目名称:lambda-packs,代码行数:19,代码来源:egg_info.py

示例4: add_defaults

# 需要导入模块: from setuptools.command.sdist import sdist [as 别名]
# 或者: from setuptools.command.sdist.sdist import add_defaults [as 别名]
def add_defaults(self):
        sdist.add_defaults(self)
        self.check_license()
        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) 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:20,代码来源:egg_info.py

示例5: run

# 需要导入模块: from setuptools.command.sdist import sdist [as 别名]
# 或者: from setuptools.command.sdist.sdist import add_defaults [as 别名]
def run(self):
        self.filelist = FileList()
        if not os.path.exists(self.manifest):
            self.write_manifest()  # it must exist so it'll get in the list
        self.filelist.findall()
        self.add_defaults()
        if os.path.exists(self.template):
            self.read_template()
        self.prune_file_list()
        self.filelist.sort()
        self.filelist.remove_duplicates()
        self.write_manifest() 
开发者ID:jpush,项目名称:jbox,代码行数:14,代码来源:egg_info.py

示例6: add_defaults

# 需要导入模块: from setuptools.command.sdist import sdist [as 别名]
# 或者: from setuptools.command.sdist.sdist import add_defaults [as 别名]
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._add_egg_info(cmd=ei_cmd)
        self.filelist.include_pattern("*", prefix=ei_cmd.egg_info) 
开发者ID:jpush,项目名称:jbox,代码行数:14,代码来源:egg_info.py

示例7: run

# 需要导入模块: from setuptools.command.sdist import sdist [as 别名]
# 或者: from setuptools.command.sdist.sdist import add_defaults [as 别名]
def run(self):
        self.filelist = FileList()
        if not os.path.exists(self.manifest):
            self.write_manifest()  # it must exist so it'll get in the list
        self.add_defaults()
        if os.path.exists(self.template):
            self.read_template()
        self.prune_file_list()
        self.filelist.sort()
        self.filelist.remove_duplicates()
        self.write_manifest() 
开发者ID:sofia-netsurv,项目名称:python-netsurv,代码行数:13,代码来源:egg_info.py


注:本文中的setuptools.command.sdist.sdist.add_defaults方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。