コード例 #1
0
    def install_step(self):
        """Copy all unpacked source directories to install directory, one-by-one."""
        cmd = self.cfg['preinstallopts']
        if cmd:
            self.log.info(
                "Running preinstallopts of %s using command '%s'..." %
                (self.name, cmd))
            run_cmd(cmd, log_all=True, simple=True)
            self.cfg['preinstallopts'] = None

        try:
            os.chdir(self.builddir)
            for src in os.listdir(self.builddir):
                srcpath = os.path.join(self.builddir, src)
                if os.path.isdir(srcpath):
                    # copy files to install dir via Binary
                    self.cfg['start_dir'] = src
                    Binary.install_step(self)
                elif os.path.isfile(srcpath):
                    shutil.copy2(srcpath, self.installdir)
                else:
                    raise EasyBuildError(
                        "Path %s is not a file nor a directory?", srcpath)
        except OSError, err:
            raise EasyBuildError(
                "Failed to copy unpacked sources to install directory: %s",
                err)
コード例 #2
0
 def install_step(self):
     """Copy all unpacked source directories to install directory, one-by-one."""
     try:
         os.chdir(self.builddir)
         for src in os.listdir(self.builddir):
             srcpath = os.path.join(self.builddir, src)
             if os.path.isdir(srcpath):
                 # copy files to install dir via Binary
                 self.cfg['start_dir'] = src
                 Binary.install_step(self)
     except OSError, err:
         self.log.error("Failed to copy unpacked sources to install directory: %s" % err)
コード例 #3
0
 def install_step(self):
     """Copy all unpacked source directories to install directory, one-by-one."""
     try:
         os.chdir(self.builddir)
         for src in os.listdir(self.builddir):
             srcpath = os.path.join(self.builddir, src)
             if os.path.isdir(srcpath):
                 # copy files to install dir via Binary
                 self.cfg['start_dir'] = src
                 Binary.install_step(self)
             elif os.path.isfile(srcpath):
                 shutil.copy2(srcpath, self.installdir)
             else:
                 raise EasyBuildError("Path %s is not a file nor a directory?", srcpath)
     except OSError as err:
         raise EasyBuildError("Failed to copy unpacked sources to install directory: %s", err)
コード例 #4
0
 def extra_options(extra_vars=None):
     """Define extra easyconfig parameters specific to Allinea."""
     extra = Binary.extra_options(extra_vars)
     extra.update({
         'templates': [[], "List of templates.", CUSTOM],
     })
     return extra
コード例 #5
0
 def install_step(self):
     """Copy all unpacked source directories to install directory, one-by-one."""
     try:
         os.chdir(self.builddir)
         for src in os.listdir(self.builddir):
             srcpath = os.path.join(self.builddir, src)
             if os.path.isdir(srcpath):
                 # copy files to install dir via Binary
                 self.cfg['start_dir'] = src
                 Binary.install_step(self)
             elif os.path.isfile(srcpath):
                 shutil.copy2(srcpath, self.installdir)
             else:
                 raise EasyBuildError("Path %s is not a file nor a directory?", srcpath)
     except OSError as err:
         raise EasyBuildError("Failed to copy unpacked sources to install directory: %s", err)
コード例 #6
0
 def extra_options(extra_vars=None):
     """Define extra easyconfig parameters specific to Allinea."""
     extra = Binary.extra_options(extra_vars)
     extra.update({
         'templates': [[], "List of templates.", CUSTOM],
     })
     return extra
コード例 #7
0
    def extra_options():
        """Define custom easyconfig parameters for TensorRT."""

        # Combine extra variables from Binary and PythonPackage easyblocks
        extra_vars = Binary.extra_options()
        extra_vars = PythonPackage.extra_options(extra_vars)
        return EasyBlock.extra_options(extra_vars)
コード例 #8
0
ファイル: allinea.py プロジェクト: jhale/easybuild-easyblocks
    def extra_options(extra_vars=None):
        """Define extra easyconfig parameters specific to Allinea."""

        orig_vars = Binary.extra_options(extra_vars)
        allinea_vars = [("templates", [[], "List of templates.", CUSTOM])]
        allinea_vars.extend(orig_vars)
        return allinea_vars
コード例 #9
0
    def extra_options():
        """Define custom easyconfig parameters for TensorRT."""

        # Combine extra variables from Binary and PythonPackage easyblocks
        extra_vars = Binary.extra_options()
        extra_vars = PythonPackage.extra_options(extra_vars)
        return EasyBlock.extra_options(extra_vars)
コード例 #10
0
 def extra_options():
     extra_vars = Binary.extra_options()
     extra_vars.update({
         'components': [None, "AOMP components to build. Possible components: " +
                        ', '.join(AOMP_ALL_COMPONENTS), CUSTOM],
     })
     return extra_vars
コード例 #11
0
ファイル: molpro.py プロジェクト: boegel/easybuild-easyblocks
 def extra_options():
     """Define custom easyconfig parameters for Molpro."""
     # Combine extra variables from Binary and ConfigureMake easyblocks as
     # well as those needed for Molpro specifically
     extra_vars = Binary.extra_options()
     extra_vars = ConfigureMake.extra_options(extra_vars)
     extra_vars.update({"precompiled_binaries": [False, "Are we installing precompiled binaries?", CUSTOM]})
     return EasyBlock.extra_options(extra_vars)
コード例 #12
0
    def extra_options(extra_vars=None):
        """Define extra easyconfig parameters specific to Allinea."""

        orig_vars = dict(Binary.extra_options(extra_vars))
        allinea_vars = {
            'templates': [[], "List of templates.", CUSTOM],
        }
        allinea_vars.update(orig_vars)
        return allinea_vars.items()
コード例 #13
0
 def extra_options():
     """Additional easyconfig parameters custom to Mathematica."""
     extra_vars = {
         'activation_key': [
             None, "Activation key (expected format: 0000-0000-AAAAA)",
             CUSTOM
         ],
     }
     return Binary.extra_options(extra_vars)
コード例 #14
0
ファイル: cuda.py プロジェクト: surak/JSC
 def extra_options():
     """Create a set of wrappers based on a list determined by the easyconfig file"""
     extra_vars = {
         'host_compilers': [
             None, "Host compilers for which a wrapper will be generated",
             CUSTOM
         ]
     }
     return Binary.extra_options(extra_vars)
コード例 #15
0
 def extra_options():
     """Define custom easyconfig parameters for Molpro."""
     # Combine extra variables from Binary and ConfigureMake easyblocks as
     # well as those needed for Molpro specifically
     extra_vars = Binary.extra_options()
     extra_vars = ConfigureMake.extra_options(extra_vars)
     extra_vars.update({
         'precompiled_binaries': [False, "Are we installing precompiled binaries?", CUSTOM],
     })
     return EasyBlock.extra_options(extra_vars)
コード例 #16
0
 def extra_options(extra_vars=None):
     """Extra easyconfig parameters specific to Conda easyblock."""
     extra_vars = Binary.extra_options(extra_vars)
     extra_vars.update({
         'channels': [None, "List of conda channels to pass to 'conda install'", CUSTOM],
         'environment_file': [None, "Conda environment.yml file to use with 'conda env create'", CUSTOM],
         'remote_environment': [None, "Remote conda environment to use with 'conda env create'", CUSTOM],
         'requirements': [None, "Requirements specification to pass to 'conda install'", CUSTOM],
     })
     return extra_vars
コード例 #17
0
 def extra_options(extra_vars=None):
     """Extra easyconfig parameters specific to RPMs."""
     extra_vars = Binary.extra_options(extra_vars)
     extra_vars.update({
         'force': [False, "Use force", CUSTOM],
         'preinstall': [False, "Enable pre install", CUSTOM],
         'postinstall': [False, "Enable post install", CUSTOM],
         'makesymlinks': [[], "Create symlinks for listed paths", CUSTOM],  # supports glob
     })
     return extra_vars
コード例 #18
0
 def extra_options(extra_vars=None):
     """Extra easyconfig parameters specific to RPMs."""
     extra_vars = Binary.extra_options(extra_vars)
     extra_vars.update({
         'force': [False, "Use force", CUSTOM],
         'preinstall': [False, "Enable pre install", CUSTOM],
         'postinstall': [False, "Enable post install", CUSTOM],
         'makesymlinks': [[], "Create symlinks for listed paths", CUSTOM],  # supports glob
     })
     return extra_vars
コード例 #19
0
 def extra_options():
     extra_vars = [
         # staged install via a tmp dir can help with the hard (potentially faulty) check on available disk space
         ('staged_install', [
             False,
             "Should the installation should be staged via a temporary dir?",
             CUSTOM
         ]),
     ]
     return Binary.extra_options(extra_vars)
コード例 #20
0
 def extra_options():
     extra_vars = {
         'with_fe_safe': [
             None,
             "Enable installation of fe-safe (if None: auto-enable for ABAQUS >= 2020)",
             CUSTOM
         ],
         'with_tosca': [
             None,
             "Enable installation of Tosca (if None: auto-enable for ABAQUS >= 2020)",
             CUSTOM
         ],
     }
     return Binary.extra_options(extra_vars)
コード例 #21
0
    def fetch_sources(self, sources=None, checksums=None):
        """
        We need to modify the source filename based on the architecture
        """
        if sources is None:
            sources = self.cfg['sources']

        myarch = get_cpu_architecture()
        if myarch == X86_64:
            cudaarch = ''
        elif myarch == POWER:
            cudaarch = '_ppc64le'
        else:
            raise EasyBuildError("Architecture %s is not supported for CUDA on EasyBuild", myarch)

        modified_sources = []
        for source in sources:
            modified_sources.append(source % {'cudaarch': cudaarch})

        return Binary.fetch_sources(self, modified_sources, checksums)
コード例 #22
0
 def extra_options(extra_vars=None):
     """Extra easyconfig parameters specific to Conda easyblock."""
     extra_vars = Binary.extra_options(extra_vars)
     extra_vars.update({
         'channels': [
             None, "List of conda channels to pass to 'conda install'",
             CUSTOM
         ],
         'environment_file': [
             None,
             "Conda environment.yml file to use with 'conda env create'",
             CUSTOM
         ],
         'remote_environment': [
             None,
             "Remote conda environment to use with 'conda env create'",
             CUSTOM
         ],
         'requirements': [
             None, "Requirements specification to pass to 'conda install'",
             CUSTOM
         ],
     })
     return extra_vars
コード例 #23
0
    def install_step(self):
        """Custom install procedure for TensorRT."""

        # Make the basic installation of the binaries etc
        Binary.install_step(self)
コード例 #24
0
    def install_step(self):
        """Custom install procedure for TensorRT."""

        # Make the basic installation of the binaries etc
        Binary.install_step(self)
コード例 #25
0
ファイル: cst.py プロジェクト: bear-rsg/easybuild-easyblocks
 def extra_options(extra_vars=None):
     """Extra easyconfig parameters specific to CST Studio Suite easyblock."""
     extra_vars = {
         'sp_level': [None, "Service pack level to apply", CUSTOM]
     }
     return Binary.extra_options(extra_vars)
コード例 #26
0
 def extract_step(self):
     """Extract Molpro source files, or just copy in case of binary install."""
     if self.cfg['precompiled_binaries']:
         Binary.extract_step(self)
     else:
         ConfigureMake.extract_step(self)
コード例 #27
0
 def extract_step(self):
     """Extract Molpro source files, or just copy in case of binary install."""
     if self.cfg['precompiled_binaries']:
         Binary.extract_step(self)
     else:
         ConfigureMake.extract_step(self)
コード例 #28
0
 def extra_options():
     """Create a set of wrappers based on a list determined by the easyconfig file"""
     extra_vars = {
         'host_compilers': [None, "Host compilers for which a wrapper will be generated", CUSTOM]
     }
     return Binary.extra_options(extra_vars)
コード例 #29
0
 def extra_options():
     """Additional easyconfig parameters custom to Mathematica."""
     extra_vars = {
         'activation_key': [None, "Activation key (expected format: 0000-0000-AAAAA)", CUSTOM],
     }
     return Binary.extra_options(extra_vars)
コード例 #30
0
 def extra_options():
     extra_vars = {
         # staged install via a tmp dir can help with the hard (potentially faulty) check on available disk space
         'staged_install': [False, "Should the installation should be staged via a temporary dir?", CUSTOM],
     }
     return Binary.extra_options(extra_vars)