本文整理汇总了Python中distutils.core.PyPIRCCommand.finalize_options方法的典型用法代码示例。如果您正苦于以下问题:Python PyPIRCCommand.finalize_options方法的具体用法?Python PyPIRCCommand.finalize_options怎么用?Python PyPIRCCommand.finalize_options使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类distutils.core.PyPIRCCommand
的用法示例。
在下文中一共展示了PyPIRCCommand.finalize_options方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: finalize_options
# 需要导入模块: from distutils.core import PyPIRCCommand [as 别名]
# 或者: from distutils.core.PyPIRCCommand import finalize_options [as 别名]
def finalize_options(self):
PyPIRCCommand.finalize_options(self)
if self.identity and not self.sign:
raise DistutilsOptionError(
"Must use --sign for --identity to have meaning"
)
config = self._read_pypirc()
if config != {}:
self.username = config['username']
self.password = config['password']
self.repository = config['repository']
self.realm = config['realm']
# getting the password from the distribution
# if previously set by the register command
if not self.password and self.distribution.password:
self.password = self.distribution.password
示例2: finalize_options
# 需要导入模块: from distutils.core import PyPIRCCommand [as 别名]
# 或者: from distutils.core.PyPIRCCommand import finalize_options [as 别名]
def finalize_options(self):
PyPIRCCommand.finalize_options(self)
# setting options for the `check` subcommand
check_options = {'strict': ('register', self.strict),
'restructuredtext': ('register', 1)}
self.distribution.command_options['check'] = check_options
示例3: run
# 需要导入模块: from distutils.core import PyPIRCCommand [as 别名]
# 或者: from distutils.core.PyPIRCCommand import finalize_options [as 别名]
def run(self):
self.finalize_options()
self._set_config()
# Run sub commands
for cmd_name in self.get_sub_commands():
self.run_command(cmd_name)
if self.dry_run:
self.verify_metadata()
elif self.list_classifiers:
self.classifiers()
else:
self.send_metadata()