本文整理汇总了Python中easybuild.framework.application.Application.make_dir方法的典型用法代码示例。如果您正苦于以下问题:Python Application.make_dir方法的具体用法?Python Application.make_dir怎么用?Python Application.make_dir使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类easybuild.framework.application.Application
的用法示例。
在下文中一共展示了Application.make_dir方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: configure
# 需要导入模块: from easybuild.framework.application import Application [as 别名]
# 或者: from easybuild.framework.application.Application import make_dir [as 别名]
def configure(self):
# things might go wrong if a previous install dir is present, so let's get rid of it
if not self.getcfg('keeppreviousinstall'):
self.log.info("Making sure any old installation is removed before we start the build...")
Application.make_dir(self, self.installdir, True, dontcreateinstalldir=True)
# additional configuration options
add_configopts = '--with-rdma=%s ' % self.getcfg('rdma_type')
# use POSIX threads
add_configopts += '--with-thread-package=pthreads '
if self.getcfg('debug'):
# debug build, with error checking, timing and debug info
# note: this will affact performance
add_configopts += '--enable-fast=none '
else:
# optimized build, no error checking, timing or debug info
add_configopts += '--enable-fast '
# enable shared libraries, using GCC and GNU ld options
add_configopts += '--enable-shared --enable-sharedlibs=gcc '
# enable Fortran 77/90 and C++ bindings
add_configopts += '--enable-f77 --enable-fc --enable-cxx '
# MVAPICH configure script complains when F90 or F90FLAGS are set,
# they should be replaced with FC/FCFLAGS instead
for (envvar, new_envvar) in [("F90", "FC"), ("F90FLAGS", "FCFLAGS")]:
envvar_val = os.getenv(envvar)
if envvar_val:
if not os.getenv(new_envvar):
env.set(new_envvar, envvar_val)
env.set(envvar, '')
else:
self.log.error("Both %(ev)s and %(nev)s set, can I overwrite %(nev)s with %(ev)s (%(evv)s) ?" %
{
'ev': envvar,
'nev': new_envvar,
'evv': envvar_val
})
# enable specific support options (if desired)
if self.getcfg('withmpe'):
add_configopts += '--enable-mpe '
if self.getcfg('withlimic2'):
add_configopts += '--enable-limic2 '
if self.getcfg('withchkpt'):
add_configopts += '--enable-checkpointing --with-hydra-ckpointlib=blcr '
self.updatecfg('configopts', add_configopts)
Application.configure(self)