本文整理匯總了Python中distutils.command.upload.upload.finalize_options方法的典型用法代碼示例。如果您正苦於以下問題:Python upload.finalize_options方法的具體用法?Python upload.finalize_options怎麽用?Python upload.finalize_options使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類distutils.command.upload.upload
的用法示例。
在下文中一共展示了upload.finalize_options方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: finalize_options
# 需要導入模塊: from distutils.command.upload import upload [as 別名]
# 或者: from distutils.command.upload.upload import finalize_options [as 別名]
def finalize_options(self):
upload.finalize_options(self)
if self.upload_dir is None:
if self.has_sphinx():
build_sphinx = self.get_finalized_command('build_sphinx')
self.target_dir = build_sphinx.builder_target_dir
else:
build = self.get_finalized_command('build')
self.target_dir = os.path.join(build.build_base, 'docs')
else:
self.ensure_dirname('upload_dir')
self.target_dir = self.upload_dir
self.announce('Using upload directory %s' % self.target_dir)