Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions easybuild/easyblocks/a/ansys.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,16 @@ def __init__(self, *args, **kwargs):

def install_step(self):
"""Custom install procedure for ANSYS."""
licserv = self.cfg['license_server']
if licserv is None:
licserv = os.getenv('EB_ANSYS_LICENSE_SERVER', 'license.example.com')
licport = self.cfg['license_server_port']
if licport is None:
licport = os.getenv('EB_ANSYS_LICENSE_SERVER_PORT', '2325:1055')

# Sources (e.g. iso files) may drop the execute permissions
adjust_permissions('INSTALL', stat.S_IXUSR)
cmd = "./INSTALL -silent -install_dir %s -licserverinfo %s:%s" % (self.installdir, licport, licserv)
cmd = "./INSTALL -silent -install_dir %s" % self.installdir
# E.g. license.example.com or license1.example.com,license2.example.com
licserv = self.cfg.get('license_server', os.getenv('EB_ANSYS_LICENSE_SERVER'))
# E.g. '2325:1055' or just ':' to use those defaults
licport = self.cfg.get('license_server_port', os.getenv('EB_ANSYS_LICENSE_SERVER_PORT'))
if licserv is not None and licport is not None:
cmd += ' -licserverinfo %s:%s' % (licport, licserv)

run_cmd(cmd, log_all=True, simple=True)

adjust_permissions(self.installdir, stat.S_IWOTH, add=False)
Expand Down