Add new versions to Avizo (#16204)

* Add new versions

add versions 2019.3 and 2019.4 and adjust the install stage accordingly

* one small fix

* fix lint

* re-ordering the versions
This commit is contained in:
asmaahassan90 2020-04-22 16:44:03 +02:00 committed by GitHub
parent 0419f2c6df
commit d65b809f9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,12 +17,31 @@ class Avizo(Package):
interface."""
homepage = "https://www.thermofisher.com/sa/en/home/industrial/electron-microscopy/electron-microscopy-instruments-workflow-solutions/3d-visualization-analysis-software.html"
version('9.7.0', '9c9b9e81957387f4218df0c5adbb80717e9ae80ab3ca6ff8da523f7f499dcc5b',
version('2019.4',
sha256='a637720535bcbe254ab56368004a9544c64ec36186373fa24f26cee279685248',
url="file://{0}/Avizo-20194-Linux64-gcc48.bin".format(os.getcwd()),
expand=False)
version('2019.3',
sha256='be109df81e2f7238f234862367841dae05e76cc62218c1f36b1d9bc9514ce5f7',
url="file://{0}/Avizo-20193-Linux64-gcc48.bin".format(os.getcwd()),
expand=False)
version('9.7.0',
sha256='9c9b9e81957387f4218df0c5adbb80717e9ae80ab3ca6ff8da523f7f499dcc5b',
url="file://{0}/Avizo-970-Linux64-gcc44.bin".format(os.getcwd()),
expand=False)
def url_for_version(self, version):
return "file://{0}/Avizo-{1}-Linux64-gcc44.bin".format(os.getcwd(),
version.joined)
gcc_ver = {
"9.7.0": "44",
"2019.3": "48",
"2019.4": "48"
}
install_dir = {
"9.7.0": 'Avizo-9.7.0',
"2019.3": join_path('..', 'Avizo'),
"2019.4": join_path('..', 'Avizo')
}
# Licensing
license_required = True
@ -37,14 +56,17 @@ def setup_run_environment(self, env):
def install(self, spec, prefix):
ver = self.version.joined
sh = which('sh')
sh('Avizo-{0}-Linux64-gcc44.bin'.format(ver), '--noexec', '--keep')
sh('Avizo-{0}-Linux64-gcc{1}.bin'
.format(ver, self.gcc_ver[self.version.string]),
'--noexec', '--keep')
with working_dir('Avizo'):
avizo_tar = tarfile.open(name='Avizo-{0}-Linux64-gcc44.tar.bz2'
.format(self.version))
avizo_tar = tarfile.open(name='Avizo-{0}-Linux64-gcc{1}.tar.bz2'
.format(self.version, self.gcc_ver
[self.version.string]))
avizo_tar.extractall()
with working_dir('Avizo-{0}'.format(self.version)):
with working_dir(self.install_dir[self.version.string]):
install_tree('bin', prefix.bin)
install_tree('lib', prefix.lib)
install_tree('data', prefix.data)