matlab: remove custom phases

This commit is contained in:
Massimiliano Culpo 2022-04-08 21:43:29 +02:00 committed by Harmen Stoppels
parent 6bdd9db594
commit c8f37797a4

View File

@ -31,21 +31,12 @@ class Matlab(Package):
version('R2016b', sha256='a3121057b1905b132e5741de9f7f8350378592d84c5525faf3ec571620a336f2') version('R2016b', sha256='a3121057b1905b132e5741de9f7f8350378592d84c5525faf3ec571620a336f2')
version('R2015b', sha256='dead402960f4ab8f22debe8b28a402069166cd967d9dcca443f6c2940b00a783') version('R2015b', sha256='dead402960f4ab8f22debe8b28a402069166cd967d9dcca443f6c2940b00a783')
phases = ['configure', 'install'] variant('mode', default='interactive',
values=('interactive', 'silent', 'automated'),
description='Installation mode (interactive, silent, or automated)')
variant( variant('key', default='<installation-key-here>',
'mode', description='The file installation key to use')
default='interactive',
values=('interactive', 'silent', 'automated'),
description='Installation mode (interactive, silent, or automated)'
)
variant(
'key',
default='<installation-key-here>',
values=lambda x: True, # Anything goes as a key
description='The file installation key to use'
)
# Licensing # Licensing
license_required = True license_required = True
@ -59,7 +50,7 @@ class Matlab(Package):
def url_for_version(self, version): def url_for_version(self, version):
return "file://{0}/matlab_{1}_glnxa64.zip".format(os.getcwd(), version) return "file://{0}/matlab_{1}_glnxa64.zip".format(os.getcwd(), version)
def configure(self, spec, prefix): def install(self, spec, prefix):
config = { config = {
'destinationFolder': prefix, 'destinationFolder': prefix,
'mode': spec.variants['mode'].value, 'mode': spec.variants['mode'].value,
@ -73,7 +64,6 @@ def configure(self, spec, prefix):
for key in config: for key in config:
input_file.write('{0}={1}\n'.format(key, config[key])) input_file.write('{0}={1}\n'.format(key, config[key]))
def install(self, spec, prefix):
# Run silent installation script # Run silent installation script
# Full path required # Full path required
input_file = join_path( input_file = join_path(