Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def sanitycheck(self):
"""Custom sanity check for Primer3."""
if not self.getcfg('sanityCheckPaths'):
self.setcfg('sanityCheckPaths', {'files':["%s/%s" % (self.bindir, x) for x in ["primer3_core",
"ntdpal",
"oligotm",
"long_seq_tm_test"]],
'dirs':[]
}
)
self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths'))
Application.sanitycheck(self)
#
# You should have received a copy of the GNU General Public License
# along with EasyBuild. If not, see .
##
"""
EasyBuild support for installing Maple, implemented as an easyblock
"""
import os
import shutil
from easybuild.framework.application import Application
from easybuild.tools.filetools import run_cmd_qa
class EB_Maple(Application):
"""Support for installing Maple."""
def unpack_src(self):
"""Unpacking of files is just copying Maple binary installer to build dir."""
for f in self.src:
shutil.copy(f['path'], os.path.join(self.builddir, f['name']))
f['finalpath'] = self.builddir
def configure(self):
"""No configuration needed, binary installer"""
pass
def make(self):
"""No compilation needed, binary installer"""
pass
#
# EasyBuild is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with EasyBuild. If not, see .
##
"""
EasyBuild support for building and installing guile, implemented as an easyblock
"""
from easybuild.framework.application import Application
class EB_guile(Application):
"""
Support for building/installing guile: default build procedure, and set correct CPATH.
"""
def make_module_req_guess(self):
"""Add guile/2.0 to cpath"""
guess = Application.make_module_req_guess(self)
guess['CPATH'] = guess['CPATH'] + ["include/guile/2.0"]
return guess
def make_module_extra(self):
txt = Application.make_module_extra(self)
txt += get_netcdf_module_set_cmds(self.log)
return txt
def make_module_req_guess(self):
"""Add guile/2.0 to cpath"""
guess = Application.make_module_req_guess(self)
guess['CPATH'] = guess['CPATH'] + ["include/guile/2.0"]
return guess
# along with EasyBuild. If not, see .
##
"""
EasyBuild support for Boost, implemented as an easyblock
"""
import os
import shutil
import easybuild.tools.toolkit as toolkit
from easybuild.framework.application import Application
from easybuild.framework.easyconfig import CUSTOM
from easybuild.tools.filetools import run_cmd
from easybuild.tools.modules import get_software_root
class EB_Boost(Application):
"""Support for building Boost."""
def __init__(self, *args, **kwargs):
"""Initialize Boost-specific variables."""
Application.__init__(self, *args, **kwargs)
self.objdir = None
@staticmethod
def extra_options():
"""Add extra easyconfig parameters for Boost."""
extra_vars = [('boost_mpi', [False, "Build mpi boost module (default: False)", CUSTOM])]
return Application.extra_options(extra_vars)
def configure(self):
# some randomly selected binaries
# if one of these is missing, it's very likely something went wrong
bins = [os.path.join(odir, "bin", x) for x in []] + \
[os.path.join(toolsdir, "buoyant%sSimpleFoam" % x) for x in ["", "Boussinesq"]] + \
[os.path.join(toolsdir, "%sFoam" % x) for x in ["bubble", "engine", "sonic"]] + \
[os.path.join(toolsdir, "surface%s" % x) for x in ["Add", "Find", "Smooth"]] + \
[os.path.join(toolsdir, x) for x in ["deformedGeom", "engineSwirl", "modifyMesh", "refineMesh", "vorticity"]]
self.setcfg('sanityCheckPaths',{'files':["%s/etc/%s" % (odir, x) for x in ["bashrc", "cshrc"]] + bins,
'dirs':pdirs
})
self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths'))
Application.sanitycheck(self)
def make_module_extra(self):
"""Set python-meep specific environment variables in module."""
txt = Application.make_module_extra(self)
meep = os.getenv("SOFTROOTMEEP")
txt += "setenv\tMEEP_INCLUDE\t\t%s/include\n" % meep
txt += "setenv\tMEEP_LIB\t\t%s/lib\n" % meep
for var in ["PYTHONMEEPPATH", "PYTHONMEEP_INCLUDE", "PYTHONPATH"]:
txt += "setenv\t%s\t\t$root/site-packages\n" % var
return txt
@staticmethod
def extra_options():
"""Add extra easyconfig parameters for Boost."""
extra_vars = [('boost_mpi', [False, "Build mpi boost module (default: False)", CUSTOM])]
return Application.extra_options(extra_vars)
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with EasyBuild. If not, see .
##
"""
EasyBuild support for BiSearch, implemented as an easyblock
"""
import os
from easybuild.framework.application import Application
from easybuild.tools.filetools import run_cmd_qa
class EB_BiSearch(Application):
"""
Support for building BiSearch.
Basically just run the interactive installation script install.sh.
"""
def configure(self):
"""(no configure)"""
pass
def make(self):
"""(empty, building is performed in make_install step)"""
pass
def make_install(self):
cmd = "./install.sh"