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


Python command.egg_info方法代码示例

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


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

示例1: run_setup

# 需要导入模块: from setuptools import command [as 别名]
# 或者: from setuptools.command import egg_info [as 别名]
def run_setup(self, setup_script, setup_base, args):
        sys.modules.setdefault('distutils.command.bdist_egg', bdist_egg)
        sys.modules.setdefault('distutils.command.egg_info', egg_info)

        args = list(args)
        if self.verbose > 2:
            v = 'v' * (self.verbose - 1)
            args.insert(0, '-' + v)
        elif self.verbose < 2:
            args.insert(0, '-q')
        if self.dry_run:
            args.insert(0, '-n')
        log.info(
            "Running %s %s", setup_script[len(setup_base) + 1:], ' '.join(args)
        )
        try:
            run_setup(setup_script, args)
        except SystemExit as v:
            raise DistutilsError("Setup script exited with %s" % (v.args[0],)) 
开发者ID:jpush,项目名称:jbox,代码行数:21,代码来源:easy_install.py

示例2: run_setup

# 需要导入模块: from setuptools import command [as 别名]
# 或者: from setuptools.command import egg_info [as 别名]
def run_setup(self, setup_script, setup_base, args):
        sys.modules.setdefault('distutils.command.bdist_egg', bdist_egg)
        sys.modules.setdefault('distutils.command.egg_info', egg_info)

        args = list(args)
        if self.verbose>2:
            v = 'v' * (self.verbose - 1)
            args.insert(0,'-'+v)
        elif self.verbose<2:
            args.insert(0,'-q')
        if self.dry_run:
            args.insert(0,'-n')
        log.info(
            "Running %s %s", setup_script[len(setup_base)+1:], ' '.join(args)
        )
        try:
            run_setup(setup_script, args)
        except SystemExit:
            v = sys.exc_info()[1]
            raise DistutilsError("Setup script exited with %s" % (v.args[0],)) 
开发者ID:MayOneUS,项目名称:pledgeservice,代码行数:22,代码来源:easy_install.py

示例3: test_version_10_format

# 需要导入模块: from setuptools import command [as 别名]
# 或者: from setuptools.command import egg_info [as 别名]
def test_version_10_format(self):
        """
        """
        #keeping this set for 1.6 is a good check on the get_svn_revision
        #to ensure I return using svnversion what would had been returned
        version_str = svn_utils.SvnInfo.get_svn_version()
        version = [int(x) for x in version_str.split('.')[:2]]
        if version != [1, 6]:
            if hasattr(self, 'skipTest'):
                self.skipTest('')
            else:
                sys.stderr.write('\n   Skipping due to SVN Version\n')
                return

        self._write_entries(ENTRIES_V10)
        rev = egg_info.egg_info.get_svn_revision()
        self.assertEqual(rev, '89000') 
开发者ID:aliyun,项目名称:oss-ftp,代码行数:19,代码来源:test_egg_info.py

示例4: test_svn_tags

# 需要导入模块: from setuptools import command [as 别名]
# 或者: from setuptools.command import egg_info [as 别名]
def test_svn_tags(self):
        code, data = environment.run_setup_py(["egg_info",
                                               "--tag-svn-revision"],
                                              pypath=self.old_cwd,
                                              data_stream=1)
        if code:
            raise AssertionError(data)

        pkginfo = os.path.join('dummy.egg-info', 'PKG-INFO')
        infile = open(pkginfo, 'r')
        try:
            read_contents = infile.readlines()
        finally:
            infile.close()
            del infile

        self.assertTrue("Version: 0.1.1-r1\n" in read_contents) 
开发者ID:aliyun,项目名称:oss-ftp,代码行数:19,代码来源:test_egg_info.py

示例5: test_no_tags

# 需要导入模块: from setuptools import command [as 别名]
# 或者: from setuptools.command import egg_info [as 别名]
def test_no_tags(self):
        code, data = environment.run_setup_py(["egg_info"],
                                              pypath=self.old_cwd,
                                              data_stream=1)
        if code:
            raise AssertionError(data)

        pkginfo = os.path.join('dummy.egg-info', 'PKG-INFO')
        infile = open(pkginfo, 'r')
        try:
            read_contents = infile.readlines()
        finally:
            infile.close()
            del infile

        self.assertTrue("Version: 0.1.1\n" in read_contents) 
开发者ID:aliyun,项目名称:oss-ftp,代码行数:18,代码来源:test_egg_info.py

示例6: run_setup

# 需要导入模块: from setuptools import command [as 别名]
# 或者: from setuptools.command import egg_info [as 别名]
def run_setup(self, setup_script, setup_base, args):
        sys.modules.setdefault('distutils.command.bdist_egg', bdist_egg)
        sys.modules.setdefault('distutils.command.egg_info', egg_info)

        args = list(args)
        if self.verbose > 2:
            v = 'v' * (self.verbose - 1)
            args.insert(0, '-' + v)
        elif self.verbose < 2:
            args.insert(0, '-q')
        if self.dry_run:
            args.insert(0, '-n')
        log.info(
            "Running %s %s", setup_script[len(setup_base) + 1:], ' '.join(args)
        )
        try:
            run_setup(setup_script, args)
        except SystemExit as v:
            raise DistutilsError(
                "Setup script exited with %s" % (v.args[0],)
            ) from v 
开发者ID:pypa,项目名称:setuptools,代码行数:23,代码来源:easy_install.py


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