From 2fb128fb341294f1f3848fbff55d30a6e123f8dd Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 16 Mar 2016 13:35:55 -0500 Subject: Add PGI Compiler Package --- var/spack/repos/builtin/packages/pgi/package.py | 97 +++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 var/spack/repos/builtin/packages/pgi/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/pgi/package.py b/var/spack/repos/builtin/packages/pgi/package.py new file mode 100644 index 0000000000..44512b23af --- /dev/null +++ b/var/spack/repos/builtin/packages/pgi/package.py @@ -0,0 +1,97 @@ +from spack import * +import spack +import llnl.util.tty as tty +import os + +class Pgi(Package): + """PGI optimizing multi-core x64 compilers for Linux, MacOS & Windows + with support for debugging and profiling of local MPI processes. + + Note: The PGI compilers are licensed software. You will need to create + an account on the PGI homepage and download PGI yourself. Once the download + finishes, rename the file (which may contain information such as the + architecture) to the format: pgi-.tar.gz. Spack will search your + current directory for a file of this format. Alternatively, add this + file to a mirror so that Spack can find it. For instructions on how to + set up a mirror, see http://software.llnl.gov/spack/mirrors.html""" + + homepage = "http://www.pgroup.com/" + url = "file://%s/pgi-16.3.tar.gz" % os.getcwd() + + version('16.3', '618cb7ddbc57d4e4ed1f21a0ab25f427') + + variant('network', default=True, description="Perform a network install") + variant('single', default=False, description="Perform a single system install") + variant('nvidia', default=False, description="Enable installation of optional NVIDIA components, such as CUDA") + variant('amd', default=False, description="Enable installation of optional AMD components") + variant('java', default=False, description="Enable installation of Java Runtime Environment") + variant('mpi', default=False, description="Enable installation of Open MPI") + + + def set_up_license(self, prefix): + license_path = "%s/license.dat" % prefix + + with open(license_path, "w") as license: + license.write("""\ +# The PGI compilers require a license to use. There are two ways to set this up. +# +# 1. (Recommended) Store your license key in this license.dat file. Example: +# +# SERVER 0123456789ab 27000 +# DAEMON pgroupd +# PACKAGE PGI2015- pgroupd A13AB920D570 \\ +# <...> +# 6167 7015 3F05 9C37 2315 ACDF 1B73 DAA9 FBAE" +# +# 2. Use the environment variable PGROUPD_LICENSE_FILE or LM_LICENSE_FILE. +# +# If you choose to store your license in a non-standard location, you may +# set either one of these variables to a full pathname to the license +# file, or port@host if you store your license keys on a dedicated +# license server. You will likely want to set this variable in a module +# file so that it gets loaded every time someone wants to use PGI. +# +# For further information on how to acquire a license, please refer to: +# http://www.pgroup.com/doc/pgiinstall.pdf +# +# You may enter your license below. + +""") + + spack.editor(license_path) + tty.message("Set up license file %s" % license_path) + + + def install(self, spec, prefix): + # Enable the silent installation feature + os.environ['PGI_SILENT'] = "true" + os.environ['PGI_ACCEPT_EULA'] = "accept" + os.environ['PGI_INSTALL_DIR'] = "%s" % prefix + + if '+network' in spec and '~single' in spec: + os.environ['PGI_INSTALL_TYPE'] = "network" + os.environ['PGI_INSTALL_LOCAL_DIR'] = "%s/%s/share_objects" % (prefix, self.version) + elif '+single' in spec and '~network' in spec: + os.environ['PGI_INSTALL_TYPE'] = "single" + else: + msg = 'You must choose either a network install or a single system install.\n' + msg += 'You cannot choose both.' + raise RuntimeError(msg) + + if '+nvidia' in spec: + os.environ['PGI_INSTALL_NVIDIA'] = "true" + + if '+amd' in spec: + os.environ['PGI_INSTALL_AMD'] = "true" + + if '+java' in spec: + os.environ['PGI_INSTALL_JAVA'] = "true" + + if '+mpi' in spec: + os.environ['PGI_INSTALL_MPI'] = "true" + + # Run install script + os.system("./install") + + # Prompt user to set up license file + self.set_up_license(prefix) -- cgit v1.2.3-70-g09d2 From 82ce798f41951741e552086534c60af5e3e3c464 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 16 Mar 2016 13:49:33 -0500 Subject: Bug fix --- var/spack/repos/builtin/packages/pgi/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/pgi/package.py b/var/spack/repos/builtin/packages/pgi/package.py index 44512b23af..66aef571f1 100644 --- a/var/spack/repos/builtin/packages/pgi/package.py +++ b/var/spack/repos/builtin/packages/pgi/package.py @@ -58,8 +58,8 @@ class Pgi(Package): """) - spack.editor(license_path) - tty.message("Set up license file %s" % license_path) + #spack.editor(license_path) + tty.msg("Set up license file %s" % license_path) def install(self, spec, prefix): -- cgit v1.2.3-70-g09d2 From 240c0643f214006ecf0321e3466fa3d5db7eb092 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 1 Apr 2016 12:23:08 -0500 Subject: Add NAG Fortran compiler package --- var/spack/repos/builtin/packages/nag/package.py | 26 ++++++++++++++ var/spack/repos/builtin/packages/pgi/package.py | 45 ++++--------------------- 2 files changed, 32 insertions(+), 39 deletions(-) create mode 100644 var/spack/repos/builtin/packages/nag/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/nag/package.py b/var/spack/repos/builtin/packages/nag/package.py new file mode 100644 index 0000000000..840b79c66b --- /dev/null +++ b/var/spack/repos/builtin/packages/nag/package.py @@ -0,0 +1,26 @@ +from spack import * +import os + +class Nag(Package): + """The NAG Fortran Compiler.""" + homepage = "http://www.nag.com/nagware/np.asp" + + version('6.1', '1e29d9d435b7ccc2842a320150b28ba4', + url='http://www.nag.com/downloads/impl/npl6a61na_amd64.tgz') + + # Licensing + license_required = True + license_files = ['lib/nag.key', + 'lib/nag.licence', + 'lib/nagware.licence'] + license_vars = ['NAG_KUSARI_FILE'] + license_url = 'http://www.nag.com/doc/inun/np61/lin-mac/klicence.txt' + + def install(self, spec, prefix): + # Set installation directories + os.environ['INSTALL_TO_BINDIR'] = prefix.bin + os.environ['INSTALL_TO_LIBDIR'] = prefix.lib + os.environ['INSTALL_TO_MANDIR'] = prefix + '/share/man/man' + + # Run install script + os.system('./INSTALLU.sh') diff --git a/var/spack/repos/builtin/packages/pgi/package.py b/var/spack/repos/builtin/packages/pgi/package.py index 66aef571f1..649c7dbee2 100644 --- a/var/spack/repos/builtin/packages/pgi/package.py +++ b/var/spack/repos/builtin/packages/pgi/package.py @@ -1,6 +1,4 @@ from spack import * -import spack -import llnl.util.tty as tty import os class Pgi(Package): @@ -27,46 +25,18 @@ class Pgi(Package): variant('java', default=False, description="Enable installation of Java Runtime Environment") variant('mpi', default=False, description="Enable installation of Open MPI") - - def set_up_license(self, prefix): - license_path = "%s/license.dat" % prefix - - with open(license_path, "w") as license: - license.write("""\ -# The PGI compilers require a license to use. There are two ways to set this up. -# -# 1. (Recommended) Store your license key in this license.dat file. Example: -# -# SERVER 0123456789ab 27000 -# DAEMON pgroupd -# PACKAGE PGI2015- pgroupd A13AB920D570 \\ -# <...> -# 6167 7015 3F05 9C37 2315 ACDF 1B73 DAA9 FBAE" -# -# 2. Use the environment variable PGROUPD_LICENSE_FILE or LM_LICENSE_FILE. -# -# If you choose to store your license in a non-standard location, you may -# set either one of these variables to a full pathname to the license -# file, or port@host if you store your license keys on a dedicated -# license server. You will likely want to set this variable in a module -# file so that it gets loaded every time someone wants to use PGI. -# -# For further information on how to acquire a license, please refer to: -# http://www.pgroup.com/doc/pgiinstall.pdf -# -# You may enter your license below. - -""") - - #spack.editor(license_path) - tty.msg("Set up license file %s" % license_path) + # Licensing + license_required = True + license_files = ['license.dat'] + license_vars = ['PGROUPD_LICENSE_FILE', 'LM_LICENSE_FILE'] + license_url = 'http://www.pgroup.com/doc/pgiinstall.pdf' def install(self, spec, prefix): # Enable the silent installation feature os.environ['PGI_SILENT'] = "true" os.environ['PGI_ACCEPT_EULA'] = "accept" - os.environ['PGI_INSTALL_DIR'] = "%s" % prefix + os.environ['PGI_INSTALL_DIR'] = prefix if '+network' in spec and '~single' in spec: os.environ['PGI_INSTALL_TYPE'] = "network" @@ -92,6 +62,3 @@ class Pgi(Package): # Run install script os.system("./install") - - # Prompt user to set up license file - self.set_up_license(prefix) -- cgit v1.2.3-70-g09d2 From 6906911e85f5df504ef0a039ac510822eafc3643 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 5 Apr 2016 11:00:55 -0500 Subject: Allow license files to use different symbols for comments --- lib/spack/spack/package.py | 72 +++++++++++++++---------- var/spack/repos/builtin/packages/nag/package.py | 13 ++++- var/spack/repos/builtin/packages/pgi/package.py | 1 + 3 files changed, 56 insertions(+), 30 deletions(-) (limited to 'var') diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 6d425c3dc7..322cf502a6 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -378,6 +378,9 @@ class Package(object): if not hasattr(self, 'license_required'): self.license_required = False + if not hasattr(self, 'license_comment'): + self.license_comment = '#' + if not hasattr(self, 'license_files'): self.license_files = [] @@ -1040,46 +1043,59 @@ class Package(object): def write_license_file(self, license_path): - # Use the first file listed in license_files + """Writes empty license file. + + Comments give suggestions on alternative methods of installing + a license.""" + + comment = self.license_comment license = open(license_path, 'w') license.write("""\ -# A license is required to use %s. -# -# The recommended solution is to store your license key in this file. -# By default, %s searches the following file(s) for a license key -# (relative to the installation prefix): -# -#\t%s -# -""" % (self.name, self.name, '\n#\t'.join(self.license_files))) +{0} A license is required to use {1}. +{0} +{0} The recommended solution is to store your license key in this file. +{0} By default, {1} searches the following file(s) for a license key +{0} (relative to the installation prefix): +{0} +""".format(comment, self.name)) + + for filename in self.license_files: + license.write("{0}\t{1}\n".format(comment, filename)) + + license.write("{0}\n".format(comment)) if self.license_vars: license.write("""\ -# Alternatively, use one of the following environment variable(s): -# -#\t%s -# -# If you choose to store your license in a non-standard location, you may -# set one of these variable(s) to the full pathname to the license file, or -# port@host if you store your license keys on a dedicated license server. -# You will likely want to set this variable in a module file so that it -# gets loaded every time someone tries to use %s. -# -""" % ('\n#\t'.join(self.license_vars), self.name)) +{0} Alternatively, use one of the following environment variable(s): +{0} +""".format(comment)) + + for var in self.license_vars: + license.write("{0}\t{1}\n".format(comment, var)) + + license.write("""\ +{0} +{0} If you choose to store your license in a non-standard location, you may +{0} set one of these variable(s) to the full pathname to the license file, or +{0} port@host if you store your license keys on a dedicated license server. +{0} You will likely want to set this variable in a module file so that it +{0} gets loaded every time someone tries to use {1}. +{0} +""".format(comment, self.name)) if self.license_url: license.write("""\ -# For further information on how to acquire a license, please refer to: -# -#\t%s -# -""" % self.license_url) +{0} For further information on how to acquire a license, please refer to: +{0} +{0}\t{1} +{0} +""".format(comment, self.license_url)) license.write("""\ -# You may enter your license below. +{0} You may enter your license below. -""") +""".format(comment)) license.close() diff --git a/var/spack/repos/builtin/packages/nag/package.py b/var/spack/repos/builtin/packages/nag/package.py index 840b79c66b..c6c33ecad5 100644 --- a/var/spack/repos/builtin/packages/nag/package.py +++ b/var/spack/repos/builtin/packages/nag/package.py @@ -5,17 +5,26 @@ class Nag(Package): """The NAG Fortran Compiler.""" homepage = "http://www.nag.com/nagware/np.asp" - version('6.1', '1e29d9d435b7ccc2842a320150b28ba4', - url='http://www.nag.com/downloads/impl/npl6a61na_amd64.tgz') + version('6.1', '1e29d9d435b7ccc2842a320150b28ba4') + version('6.0', '3fa1e7f7b51ef8a23e6c687cdcad9f96') # Licensing license_required = True + license_comment = '!' license_files = ['lib/nag.key', 'lib/nag.licence', 'lib/nagware.licence'] license_vars = ['NAG_KUSARI_FILE'] license_url = 'http://www.nag.com/doc/inun/np61/lin-mac/klicence.txt' + + def url_for_version(self, version): + # TODO: url and checksum are architecture dependent + # TODO: We currently only support x86_64 + return 'http://www.nag.com/downloads/impl/npl6a%sna_amd64.tgz' % \ + str(version).replace('.', '') + + def install(self, spec, prefix): # Set installation directories os.environ['INSTALL_TO_BINDIR'] = prefix.bin diff --git a/var/spack/repos/builtin/packages/pgi/package.py b/var/spack/repos/builtin/packages/pgi/package.py index 649c7dbee2..095569a2a9 100644 --- a/var/spack/repos/builtin/packages/pgi/package.py +++ b/var/spack/repos/builtin/packages/pgi/package.py @@ -27,6 +27,7 @@ class Pgi(Package): # Licensing license_required = True + license_comment = '#' license_files = ['license.dat'] license_vars = ['PGROUPD_LICENSE_FILE', 'LM_LICENSE_FILE'] license_url = 'http://www.pgroup.com/doc/pgiinstall.pdf' -- cgit v1.2.3-70-g09d2 From 8bcb812529eb62f1afad089dda02ea6cf6eb01cf Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 19 Apr 2016 12:28:50 -0500 Subject: Allow multiple license symlinks --- lib/spack/spack/package.py | 26 ++++++++++--------------- var/spack/repos/builtin/packages/nag/package.py | 4 +--- 2 files changed, 11 insertions(+), 19 deletions(-) (limited to 'var') diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 3feec90ddb..504e1fc3bb 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -1029,13 +1029,6 @@ class Package(object): os.path.basename(self.license_files[0])) - def local_license_symlink(self): - """Returns the path where a local license file is searched for.""" - if not self.license_files: - return - return join_path(self.prefix, self.license_files[0]) - - def set_up_license(self): """Prompt the user, letting them know that a license is required.""" @@ -1086,9 +1079,9 @@ class Package(object): license.write("""\ {0} A license is required to use {1}. {0} -{0} The recommended solution is to store your license key in this file. -{0} By default, {1} searches the following file(s) for a license key -{0} (relative to the installation prefix): +{0} The recommended solution is to store your license key in this global +{0} license file. After installation, the following symlink(s) will be +{0} added to point to this file (relative to the installation prefix): {0} """.format(comment, self.name)) @@ -1135,12 +1128,13 @@ class Package(object): def symlink_license(self): - """Create a local symlink that points to the global license file.""" - target = self.global_license_file() - link_name = self.local_license_symlink() - if os.path.exists(target): - os.symlink(target, link_name) - tty.msg("Added local symlink %s to global license file" % link_name) + """Create local symlinks that point to the global license file.""" + target = self.global_license_file() + for filename in self.license_files: + link_name = join_path(self.prefix, filename) + if os.path.exists(target): + os.symlink(target, link_name) + tty.msg("Added local symlink %s to global license file" % link_name) def do_install_dependencies(self, **kwargs): diff --git a/var/spack/repos/builtin/packages/nag/package.py b/var/spack/repos/builtin/packages/nag/package.py index c6c33ecad5..d6ffe35171 100644 --- a/var/spack/repos/builtin/packages/nag/package.py +++ b/var/spack/repos/builtin/packages/nag/package.py @@ -11,9 +11,7 @@ class Nag(Package): # Licensing license_required = True license_comment = '!' - license_files = ['lib/nag.key', - 'lib/nag.licence', - 'lib/nagware.licence'] + license_files = ['lib/nag.key'] license_vars = ['NAG_KUSARI_FILE'] license_url = 'http://www.nag.com/doc/inun/np61/lin-mac/klicence.txt' -- cgit v1.2.3-70-g09d2 From 8ea5e946a227f96272ceb6c7aa635993ddbfc9d6 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 20 Apr 2016 13:10:11 -0500 Subject: Add Allinea packages --- .../builtin/packages/allinea-forge/package.py | 29 ++++++++++++++++++++++ .../builtin/packages/allinea-reports/package.py | 28 +++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 var/spack/repos/builtin/packages/allinea-forge/package.py create mode 100644 var/spack/repos/builtin/packages/allinea-reports/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/allinea-forge/package.py b/var/spack/repos/builtin/packages/allinea-forge/package.py new file mode 100644 index 0000000000..1f757039a6 --- /dev/null +++ b/var/spack/repos/builtin/packages/allinea-forge/package.py @@ -0,0 +1,29 @@ +from spack import * + +class AllineaForge(Package): + """Allinea Forge is the complete toolsuite for software development - with + everything needed to debug, profile, optimize, edit and build C, C++ and + Fortran applications on Linux for high performance - from single threads + through to complex parallel HPC codes with MPI, OpenMP, threads or CUDA.""" + + homepage = "http://www.allinea.com/products/develop-allinea-forge" + + version('6.0.4', 'df7f769975048477a36f208d0cd57d7e') + + # Licensing + license_required = True + license_comment = '#' + license_files = ['licences/Licence'] + license_vars = ['ALLINEA_LICENCE_FILE', 'ALLINEA_LICENSE_FILE'] + license_url = 'http://www.allinea.com/user-guide/forge/Installation.html' + + + def url_for_version(self, version): + # TODO: add support for other architectures/distributions + url = "http://content.allinea.com/downloads/" + return url + "allinea-forge-%s-Redhat-6.0-x86_64.tar" % version + + + def install(self, spec, prefix): + textinstall = which('textinstall.sh') + textinstall('--accept-licence', prefix) diff --git a/var/spack/repos/builtin/packages/allinea-reports/package.py b/var/spack/repos/builtin/packages/allinea-reports/package.py new file mode 100644 index 0000000000..526d51c688 --- /dev/null +++ b/var/spack/repos/builtin/packages/allinea-reports/package.py @@ -0,0 +1,28 @@ +from spack import * + +class AllineaReports(Package): + """Allinea Performance Reports are the most effective way to characterize + and understand the performance of HPC application runs. One single-page HTML + report elegantly answers a range of vital questions for any HPC site""" + + homepage = "http://www.allinea.com/products/allinea-performance-reports" + + version('6.0.4', '3f13b08a32682737bc05246fbb2fcc77') + + # Licensing + license_required = True + license_comment = '#' + license_files = ['licences/Licence'] + license_vars = ['ALLINEA_LICENCE_FILE', 'ALLINEA_LICENSE_FILE'] + license_url = 'http://www.allinea.com/user-guide/reports/Installation.html' + + + def url_for_version(self, version): + # TODO: add support for other architectures/distributions + url = "http://content.allinea.com/downloads/" + return url + "allinea-reports-%s-Redhat-6.0-x86_64.tar" % version + + + def install(self, spec, prefix): + textinstall = which('textinstall.sh') + textinstall('--accept-licence', prefix) -- cgit v1.2.3-70-g09d2 From 5879f8207fe005a485c09a3d8802493455ba16ac Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 10 May 2016 16:40:46 -0500 Subject: Flake8 formatting changes --- lib/spack/spack/hooks/licensing.py | 6 +++-- .../builtin/packages/allinea-forge/package.py | 3 +-- .../builtin/packages/allinea-reports/package.py | 8 +++---- var/spack/repos/builtin/packages/nag/package.py | 5 ++-- var/spack/repos/builtin/packages/pgi/package.py | 27 ++++++++++++++-------- 5 files changed, 28 insertions(+), 21 deletions(-) (limited to 'var') diff --git a/lib/spack/spack/hooks/licensing.py b/lib/spack/spack/hooks/licensing.py index 56f7b6daa5..99521c8356 100644 --- a/lib/spack/spack/hooks/licensing.py +++ b/lib/spack/spack/hooks/licensing.py @@ -46,7 +46,7 @@ def set_up_license(pkg): # If not a file or variable, suggest a website for further info elif pkg.license_url: tty.warn("A license is required to use %s. See %s for details" % - (pkg.name, pkg.license_url)) + (pkg.name, pkg.license_url)) # If all else fails, you're on your own else: @@ -132,4 +132,6 @@ def symlink_license(pkg): link_name = join_path(pkg.prefix, filename) if os.path.exists(target): os.symlink(target, link_name) - tty.msg("Added local symlink %s to global license file" % link_name) + tty.msg("Added local symlink %s to global license file" % + link_name) + diff --git a/var/spack/repos/builtin/packages/allinea-forge/package.py b/var/spack/repos/builtin/packages/allinea-forge/package.py index 1f757039a6..fa88b450be 100644 --- a/var/spack/repos/builtin/packages/allinea-forge/package.py +++ b/var/spack/repos/builtin/packages/allinea-forge/package.py @@ -1,5 +1,6 @@ from spack import * + class AllineaForge(Package): """Allinea Forge is the complete toolsuite for software development - with everything needed to debug, profile, optimize, edit and build C, C++ and @@ -17,13 +18,11 @@ class AllineaForge(Package): license_vars = ['ALLINEA_LICENCE_FILE', 'ALLINEA_LICENSE_FILE'] license_url = 'http://www.allinea.com/user-guide/forge/Installation.html' - def url_for_version(self, version): # TODO: add support for other architectures/distributions url = "http://content.allinea.com/downloads/" return url + "allinea-forge-%s-Redhat-6.0-x86_64.tar" % version - def install(self, spec, prefix): textinstall = which('textinstall.sh') textinstall('--accept-licence', prefix) diff --git a/var/spack/repos/builtin/packages/allinea-reports/package.py b/var/spack/repos/builtin/packages/allinea-reports/package.py index 526d51c688..0099e6e64c 100644 --- a/var/spack/repos/builtin/packages/allinea-reports/package.py +++ b/var/spack/repos/builtin/packages/allinea-reports/package.py @@ -1,9 +1,11 @@ from spack import * + class AllineaReports(Package): """Allinea Performance Reports are the most effective way to characterize - and understand the performance of HPC application runs. One single-page HTML - report elegantly answers a range of vital questions for any HPC site""" + and understand the performance of HPC application runs. One single-page + HTML report elegantly answers a range of vital questions for any HPC site + """ homepage = "http://www.allinea.com/products/allinea-performance-reports" @@ -16,13 +18,11 @@ class AllineaReports(Package): license_vars = ['ALLINEA_LICENCE_FILE', 'ALLINEA_LICENSE_FILE'] license_url = 'http://www.allinea.com/user-guide/reports/Installation.html' - def url_for_version(self, version): # TODO: add support for other architectures/distributions url = "http://content.allinea.com/downloads/" return url + "allinea-reports-%s-Redhat-6.0-x86_64.tar" % version - def install(self, spec, prefix): textinstall = which('textinstall.sh') textinstall('--accept-licence', prefix) diff --git a/var/spack/repos/builtin/packages/nag/package.py b/var/spack/repos/builtin/packages/nag/package.py index d6ffe35171..df7344d37a 100644 --- a/var/spack/repos/builtin/packages/nag/package.py +++ b/var/spack/repos/builtin/packages/nag/package.py @@ -1,6 +1,7 @@ from spack import * import os + class Nag(Package): """The NAG Fortran Compiler.""" homepage = "http://www.nag.com/nagware/np.asp" @@ -15,13 +16,11 @@ class Nag(Package): license_vars = ['NAG_KUSARI_FILE'] license_url = 'http://www.nag.com/doc/inun/np61/lin-mac/klicence.txt' - def url_for_version(self, version): # TODO: url and checksum are architecture dependent # TODO: We currently only support x86_64 return 'http://www.nag.com/downloads/impl/npl6a%sna_amd64.tgz' % \ - str(version).replace('.', '') - + str(version).replace('.', '') def install(self, spec, prefix): # Set installation directories diff --git a/var/spack/repos/builtin/packages/pgi/package.py b/var/spack/repos/builtin/packages/pgi/package.py index 095569a2a9..8a067a43f1 100644 --- a/var/spack/repos/builtin/packages/pgi/package.py +++ b/var/spack/repos/builtin/packages/pgi/package.py @@ -1,6 +1,7 @@ from spack import * import os + class Pgi(Package): """PGI optimizing multi-core x64 compilers for Linux, MacOS & Windows with support for debugging and profiling of local MPI processes. @@ -18,12 +19,18 @@ class Pgi(Package): version('16.3', '618cb7ddbc57d4e4ed1f21a0ab25f427') - variant('network', default=True, description="Perform a network install") - variant('single', default=False, description="Perform a single system install") - variant('nvidia', default=False, description="Enable installation of optional NVIDIA components, such as CUDA") - variant('amd', default=False, description="Enable installation of optional AMD components") - variant('java', default=False, description="Enable installation of Java Runtime Environment") - variant('mpi', default=False, description="Enable installation of Open MPI") + variant('network', default=True, + description="Perform a network install") + variant('single', default=False, + description="Perform a single system install") + variant('nvidia', default=False, + description="Enable installation of optional NVIDIA components") + variant('amd', default=False, + description="Enable installation of optional AMD components") + variant('java', default=False, + description="Enable installation of Java Runtime Environment") + variant('mpi', default=False, + description="Enable installation of Open MPI") # Licensing license_required = True @@ -32,7 +39,6 @@ class Pgi(Package): license_vars = ['PGROUPD_LICENSE_FILE', 'LM_LICENSE_FILE'] license_url = 'http://www.pgroup.com/doc/pgiinstall.pdf' - def install(self, spec, prefix): # Enable the silent installation feature os.environ['PGI_SILENT'] = "true" @@ -41,12 +47,13 @@ class Pgi(Package): if '+network' in spec and '~single' in spec: os.environ['PGI_INSTALL_TYPE'] = "network" - os.environ['PGI_INSTALL_LOCAL_DIR'] = "%s/%s/share_objects" % (prefix, self.version) + os.environ['PGI_INSTALL_LOCAL_DIR'] = "%s/%s/share_objects" % \ + (prefix, self.version) elif '+single' in spec and '~network' in spec: os.environ['PGI_INSTALL_TYPE'] = "single" else: - msg = 'You must choose either a network install or a single system install.\n' - msg += 'You cannot choose both.' + msg = 'You must choose either a network install or a single ' + msg += 'system install.\nYou cannot choose both.' raise RuntimeError(msg) if '+nvidia' in spec: -- cgit v1.2.3-70-g09d2 From c043275f1b83e54ad00355fdae255aa11a2d03e1 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 11 May 2016 11:46:41 -0500 Subject: Final flake8 changes --- lib/spack/spack/hooks/licensing.py | 1 - lib/spack/spack/package.py | 8 ++------ .../builtin/packages/allinea-forge/package.py | 8 ++++---- .../builtin/packages/allinea-reports/package.py | 8 ++++---- var/spack/repos/builtin/packages/nag/package.py | 8 ++++---- var/spack/repos/builtin/packages/pgi/package.py | 22 +++++++++++----------- 6 files changed, 25 insertions(+), 30 deletions(-) (limited to 'var') diff --git a/lib/spack/spack/hooks/licensing.py b/lib/spack/spack/hooks/licensing.py index 99521c8356..31f15cc3e9 100644 --- a/lib/spack/spack/hooks/licensing.py +++ b/lib/spack/spack/hooks/licensing.py @@ -134,4 +134,3 @@ def symlink_license(pkg): os.symlink(target, link_name) tty.msg("Added local symlink %s to global license file" % link_name) - diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 17d92fdf79..8f8eb6db64 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -407,7 +407,6 @@ class Package(object): return join_path(global_license_dir, self.name, os.path.basename(self.license_files[0])) - @property def version(self): if not self.spec.versions.concrete: @@ -1021,7 +1020,6 @@ class Package(object): raise InstallError( "Install failed for %s. Nothing was installed!" % self.name) - def do_install_dependencies(self, **kwargs): # Pass along paths of dependencies here for dep in self.spec.dependencies.values(): @@ -1349,11 +1347,9 @@ class Package(object): def rpath(self): """Get the rpath this package links with, as a list of paths.""" rpaths = [self.prefix.lib, self.prefix.lib64] - rpaths.extend(d.prefix.lib - for d in self.spec.traverse(root=False) + rpaths.extend(d.prefix.lib for d in self.spec.traverse(root=False) if os.path.isdir(d.prefix.lib)) - rpaths.extend(d.prefix.lib64 - for d in self.spec.traverse(root=False) + rpaths.extend(d.prefix.lib64 for d in self.spec.traverse(root=False) if os.path.isdir(d.prefix.lib64)) return rpaths diff --git a/var/spack/repos/builtin/packages/allinea-forge/package.py b/var/spack/repos/builtin/packages/allinea-forge/package.py index fa88b450be..e5bd62dd70 100644 --- a/var/spack/repos/builtin/packages/allinea-forge/package.py +++ b/var/spack/repos/builtin/packages/allinea-forge/package.py @@ -13,10 +13,10 @@ class AllineaForge(Package): # Licensing license_required = True - license_comment = '#' - license_files = ['licences/Licence'] - license_vars = ['ALLINEA_LICENCE_FILE', 'ALLINEA_LICENSE_FILE'] - license_url = 'http://www.allinea.com/user-guide/forge/Installation.html' + license_comment = '#' + license_files = ['licences/Licence'] + license_vars = ['ALLINEA_LICENCE_FILE', 'ALLINEA_LICENSE_FILE'] + license_url = 'http://www.allinea.com/user-guide/forge/Installation.html' def url_for_version(self, version): # TODO: add support for other architectures/distributions diff --git a/var/spack/repos/builtin/packages/allinea-reports/package.py b/var/spack/repos/builtin/packages/allinea-reports/package.py index 0099e6e64c..7b11e681f5 100644 --- a/var/spack/repos/builtin/packages/allinea-reports/package.py +++ b/var/spack/repos/builtin/packages/allinea-reports/package.py @@ -13,10 +13,10 @@ class AllineaReports(Package): # Licensing license_required = True - license_comment = '#' - license_files = ['licences/Licence'] - license_vars = ['ALLINEA_LICENCE_FILE', 'ALLINEA_LICENSE_FILE'] - license_url = 'http://www.allinea.com/user-guide/reports/Installation.html' + license_comment = '#' + license_files = ['licences/Licence'] + license_vars = ['ALLINEA_LICENCE_FILE', 'ALLINEA_LICENSE_FILE'] + license_url = 'http://www.allinea.com/user-guide/reports/Installation.html' def url_for_version(self, version): # TODO: add support for other architectures/distributions diff --git a/var/spack/repos/builtin/packages/nag/package.py b/var/spack/repos/builtin/packages/nag/package.py index df7344d37a..af893d3db0 100644 --- a/var/spack/repos/builtin/packages/nag/package.py +++ b/var/spack/repos/builtin/packages/nag/package.py @@ -11,10 +11,10 @@ class Nag(Package): # Licensing license_required = True - license_comment = '!' - license_files = ['lib/nag.key'] - license_vars = ['NAG_KUSARI_FILE'] - license_url = 'http://www.nag.com/doc/inun/np61/lin-mac/klicence.txt' + license_comment = '!' + license_files = ['lib/nag.key'] + license_vars = ['NAG_KUSARI_FILE'] + license_url = 'http://www.nag.com/doc/inun/np61/lin-mac/klicence.txt' def url_for_version(self, version): # TODO: url and checksum are architecture dependent diff --git a/var/spack/repos/builtin/packages/pgi/package.py b/var/spack/repos/builtin/packages/pgi/package.py index 8a067a43f1..8dc6453469 100644 --- a/var/spack/repos/builtin/packages/pgi/package.py +++ b/var/spack/repos/builtin/packages/pgi/package.py @@ -15,29 +15,29 @@ class Pgi(Package): set up a mirror, see http://software.llnl.gov/spack/mirrors.html""" homepage = "http://www.pgroup.com/" - url = "file://%s/pgi-16.3.tar.gz" % os.getcwd() + url = "file://%s/pgi-16.3.tar.gz" % os.getcwd() version('16.3', '618cb7ddbc57d4e4ed1f21a0ab25f427') variant('network', default=True, - description="Perform a network install") + description="Perform a network install") variant('single', default=False, - description="Perform a single system install") + description="Perform a single system install") variant('nvidia', default=False, - description="Enable installation of optional NVIDIA components") + description="Enable installation of optional NVIDIA components") variant('amd', default=False, - description="Enable installation of optional AMD components") + description="Enable installation of optional AMD components") variant('java', default=False, - description="Enable installation of Java Runtime Environment") + description="Enable installation of Java Runtime Environment") variant('mpi', default=False, - description="Enable installation of Open MPI") + description="Enable installation of Open MPI") # Licensing license_required = True - license_comment = '#' - license_files = ['license.dat'] - license_vars = ['PGROUPD_LICENSE_FILE', 'LM_LICENSE_FILE'] - license_url = 'http://www.pgroup.com/doc/pgiinstall.pdf' + license_comment = '#' + license_files = ['license.dat'] + license_vars = ['PGROUPD_LICENSE_FILE', 'LM_LICENSE_FILE'] + license_url = 'http://www.pgroup.com/doc/pgiinstall.pdf' def install(self, spec, prefix): # Enable the silent installation feature -- cgit v1.2.3-70-g09d2