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


Python Application.configure方法代码示例

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


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

示例1: configure

# 需要导入模块: from easybuild.framework.application import Application [as 别名]
# 或者: from easybuild.framework.application.Application import configure [as 别名]
    def configure(self):
        """Configure build: set require config and make options, and run configure script."""

        # configure options
        deps = ["Szip", "zlib"]
        for dep in deps:
            root = get_software_root(dep)
            if root:
                self.updatecfg('configopts', '--with-%s=%s' % (dep.lower(), root))
            else:
                self.log.error("Dependency module %s not loaded." % dep)

        fcomp = 'FC="%s"' % os.getenv('F77')

        self.updatecfg('configopts', "--with-pic --with-pthread --enable-shared")
        self.updatecfg('configopts', "--enable-cxx --enable-fortran %s" % fcomp)

        # MPI and C++ support enabled requires --enable-unsupported, because this is untested by HDF5
        if self.toolkit().opts['usempi']:
            self.updatecfg('configopts', "--enable-unsupported")

        # make options
        self.updatecfg('makeopts', fcomp)

        Application.configure(self)
开发者ID:nudded,项目名称:easybuild,代码行数:27,代码来源:hdf5.py

示例2: configure

# 需要导入模块: from easybuild.framework.application import Application [as 别名]
# 或者: from easybuild.framework.application.Application import configure [as 别名]
    def configure(self):
        """Configure build: <single-line description how this deviates from standard configure>"""

        # set generic make options
        self.updatecfg('makeopts', 'CC="%s" OPTFLAGS="%s"' % (os.getenv('MPICC'), os.getenv('CFLAGS')))

        if LooseVersion(self.version()) >= LooseVersion("3.2"):

            # set correct startfrom dir, and change into it
            self.setcfg('startfrom', os.path.join(self.getcfg('startfrom'),'src'))
            try:
                os.chdir(self.getcfg('startfrom'))
            except OSError, err:
                self.log.error("Failed to change to correct source dir %s: %s" % (self.getcfg('startfrom'), err))

            # run autoconf to generate configure script
            cmd = "autoconf"
            run_cmd(cmd)

            # set config opts
            beagle = get_software_root('BEAGLE')
            if beagle:
                self.updatecfg('configopts', '--with-beagle=%s' % beagle)
            else:
                self.log.error("BEAGLE module not loaded?")

            if self.toolkit().opts['usempi']:
                self.updatecfg('configopts', '--enable-mpi')

            # configure
            Application.configure(self)
开发者ID:nudded,项目名称:easybuild,代码行数:33,代码来源:mrbayes.py

示例3: configure

# 需要导入模块: from easybuild.framework.application import Application [as 别名]
# 或者: from easybuild.framework.application.Application import configure [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)
开发者ID:nudded,项目名称:easybuild,代码行数:56,代码来源:mvapich2.py

示例4: configure

# 需要导入模块: from easybuild.framework.application import Application [as 别名]
# 或者: from easybuild.framework.application.Application import configure [as 别名]
    def configure(self):
        """Configure build: set config options and configure"""

        if self.toolkit().opts['pic']:
            self.updatecfg('configopts', "--with-pic")

        self.updatecfg('configopts', 'FCFLAGS="%s" FC="%s"' % (os.getenv('FFLAGS'), os.getenv('F90')))

        # add -DgFortran to CPPFLAGS when building with GCC
        if self.toolkit().comp_family() == toolkit.GCC:
            env.set('CPPFLAGS', "%s -DgFortran" % os.getenv('CPPFLAGS'))

        Application.configure(self)
开发者ID:nudded,项目名称:easybuild,代码行数:15,代码来源:netcdf_fortran.py


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