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


Python bdist_egg.write_safety_flag方法代码示例

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


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

示例1: write_pkg_info

# 需要导入模块: from setuptools.command import bdist_egg [as 别名]
# 或者: from setuptools.command.bdist_egg import write_safety_flag [as 别名]
def write_pkg_info(cmd, basename, filename):
    log.info("writing %s", filename)
    if not cmd.dry_run:
        metadata = cmd.distribution.metadata
        metadata.version, oldver = cmd.egg_version, metadata.version
        metadata.name, oldname = cmd.egg_name, metadata.name
        try:
            # write unescaped data to PKG-INFO, so older pkg_resources
            # can still parse it
            metadata.write_pkg_info(cmd.egg_info)
        finally:
            metadata.name, metadata.version = oldname, oldver

        safe = getattr(cmd.distribution, 'zip_safe', None)

        bdist_egg.write_safety_flag(cmd.egg_info, safe) 
开发者ID:jpush,项目名称:jbox,代码行数:18,代码来源:egg_info.py

示例2: write_pkg_info

# 需要导入模块: from setuptools.command import bdist_egg [as 别名]
# 或者: from setuptools.command.bdist_egg import write_safety_flag [as 别名]
def write_pkg_info(cmd, basename, filename):
    log.info("writing %s", filename)
    if not cmd.dry_run:
        metadata = cmd.distribution.metadata
        metadata.version, oldver = cmd.egg_version, metadata.version
        metadata.name, oldname = cmd.egg_name, metadata.name
        try:
            # write unescaped data to PKG-INFO, so older pkg_resources
            # can still parse it
            metadata.write_pkg_info(cmd.egg_info)
        finally:
            metadata.name, metadata.version = oldname, oldver

        safe = getattr(cmd.distribution,'zip_safe',None)
        from setuptools.command import bdist_egg
        bdist_egg.write_safety_flag(cmd.egg_info, safe) 
开发者ID:MayOneUS,项目名称:pledgeservice,代码行数:18,代码来源:egg_info.py

示例3: write_pkg_info

# 需要导入模块: from setuptools.command import bdist_egg [as 别名]
# 或者: from setuptools.command.bdist_egg import write_safety_flag [as 别名]
def write_pkg_info(cmd, basename, filename):
    log.info("writing %s", filename)
    if not cmd.dry_run:
        metadata = cmd.distribution.metadata
        metadata.version, oldver = cmd.egg_version, metadata.version
        metadata.name, oldname = cmd.egg_name, metadata.name

        try:
            # write unescaped data to PKG-INFO, so older pkg_resources
            # can still parse it
            metadata.write_pkg_info(cmd.egg_info)
        finally:
            metadata.name, metadata.version = oldname, oldver

        safe = getattr(cmd.distribution, 'zip_safe', None)

        bdist_egg.write_safety_flag(cmd.egg_info, safe) 
开发者ID:ryfeus,项目名称:lambda-packs,代码行数:19,代码来源:egg_info.py

示例4: write_pkg_info

# 需要导入模块: from setuptools.command import bdist_egg [as 别名]
# 或者: from setuptools.command.bdist_egg import write_safety_flag [as 别名]
def write_pkg_info(cmd, basename, filename):
    log.info("writing %s", filename)
    if not cmd.dry_run:
        metadata = cmd.distribution.metadata
        metadata.version, oldver = cmd.egg_version, metadata.version
        metadata.name, oldname = cmd.egg_name, metadata.name
        try:
            # write unescaped data to PKG-INFO, so older pkg_resources
            # can still parse it
            metadata.write_pkg_info(cmd.egg_info)
        finally:
            metadata.name, metadata.version = oldname, oldver

        safe = getattr(cmd.distribution, 'zip_safe', None)
        from setuptools.command import bdist_egg

        bdist_egg.write_safety_flag(cmd.egg_info, safe) 
开发者ID:aliyun,项目名称:oss-ftp,代码行数:19,代码来源:egg_info.py

示例5: write_pkg_info

# 需要导入模块: from setuptools.command import bdist_egg [as 别名]
# 或者: from setuptools.command.bdist_egg import write_safety_flag [as 别名]
def write_pkg_info(cmd, basename, filename):
    log.info("writing %s", filename)
    if not cmd.dry_run:
        metadata = cmd.distribution.metadata
        metadata.version, oldver = cmd.egg_version, metadata.version
        metadata.name, oldname = cmd.egg_name, metadata.name
        metadata.long_description_content_type = getattr(
            cmd.distribution,
            'long_description_content_type'
        )
        try:
            # write unescaped data to PKG-INFO, so older pkg_resources
            # can still parse it
            metadata.write_pkg_info(cmd.egg_info)
        finally:
            metadata.name, metadata.version = oldname, oldver

        safe = getattr(cmd.distribution, 'zip_safe', None)

        bdist_egg.write_safety_flag(cmd.egg_info, safe) 
开发者ID:cbrgm,项目名称:telegram-robot-rss,代码行数:22,代码来源:egg_info.py


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