本文整理匯總了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()