From 64acbbfcf03393eab99301f1e7843618c5547cf0 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sat, 28 May 2016 20:19:45 -0500 Subject: [PATCH 01/12] Clean up R package files - remove unused imports - apply pep8 - reformat text strings --- var/spack/repos/builtin/packages/R/package.py | 44 ++++++++----------- 1 file changed, 19 insertions(+), 25 deletions(-) diff --git a/var/spack/repos/builtin/packages/R/package.py b/var/spack/repos/builtin/packages/R/package.py index 0177fe1a2b..727cd38461 100644 --- a/var/spack/repos/builtin/packages/R/package.py +++ b/var/spack/repos/builtin/packages/R/package.py @@ -22,28 +22,22 @@ # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -import functools -import glob -import inspect import os -import re -from contextlib import closing -import spack -from llnl.util.lang import match_predicate from spack import * from spack.util.environment import * class R(Package): - """ - R is 'GNU S', a freely available language and environment for statistical computing and graphics which provides a - wide variety of statistical and graphical techniques: linear and nonlinear modelling, statistical tests, time series - analysis, classification, clustering, etc. Please consult the R project homepage for further information. - """ + """R is 'GNU S', a freely available language and environment for + statistical computing and graphics which provides a wide variety of + statistical and graphical techniques: linear and nonlinear modelling, + statistical tests, time series analysis, classification, clustering, etc. + Please consult the R project homepage for further information.""" + homepage = "https://www.r-project.org" url = "http://cran.cnr.berkeley.edu/src/base/R-3/R-3.1.2.tar.gz" - + extendable = True version('3.2.3', '1ba3dac113efab69e706902810cc2970') @@ -53,7 +47,8 @@ class R(Package): version('3.1.3', '53a85b884925aa6b5811dfc361d73fc4') version('3.1.2', '3af29ec06704cbd08d4ba8d69250ae74') - variant('external-lapack', default=False, description='Links to externally installed BLAS/LAPACK') + variant('external-lapack', default=False, + description='Links to externally installed BLAS/LAPACK') # Virtual dependencies depends_on('blas', when='+external-lapack') @@ -106,25 +101,24 @@ def setup_dependent_environment(self, spack_env, run_env, extension_spec): r_libs_path = ':'.join(r_libs_path) spack_env.set('R_LIBS', r_libs_path) - # For run time environment set only the path for extension_spec and prepend it to R_LIBS + # For run time environment set only the path for extension_spec and + # prepend it to R_LIBS if extension_spec.package.extends(self.spec): - run_env.prepend_path('R_LIBS', os.path.join(extension_spec.prefix, self.r_lib_dir)) - + run_env.prepend_path('R_LIBS', os.path.join( + extension_spec.prefix, self.r_lib_dir)) def setup_dependent_package(self, module, ext_spec): - """ - Called before R modules' install() methods. - - In most cases, extensions will only need to have one line:: - - R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file) - """ + """Called before R modules' install() methods. In most cases, + extensions will only need to have one line: + R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % + self.stage.archive_file)""" # R extension builds can have a global R executable function module.R = Executable(join_path(self.spec.prefix.bin, 'R')) # Add variable for library directry module.r_lib_dir = os.path.join(ext_spec.prefix, self.r_lib_dir) - # Make the site packages directory for extensions, if it does not exist already. + # Make the site packages directory for extensions, if it does not exist + # already. if ext_spec.package.is_extension: mkdirp(module.r_lib_dir) From 6649f9edc226742b4184b73106df5496ad66406a Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sat, 28 May 2016 22:25:32 -0500 Subject: [PATCH 02/12] Add version 3.3.0 of R This commit adds the 3.3.0 version of R and adds dependencies on curl and pcre. --- var/spack/repos/builtin/packages/R/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/R/package.py b/var/spack/repos/builtin/packages/R/package.py index 727cd38461..f4728bfd64 100644 --- a/var/spack/repos/builtin/packages/R/package.py +++ b/var/spack/repos/builtin/packages/R/package.py @@ -40,6 +40,7 @@ class R(Package): extendable = True + version('3.3.0', '5a7506c8813432d1621c9725e86baf7a') version('3.2.3', '1ba3dac113efab69e706902810cc2970') version('3.2.2', '57cef5c2e210a5454da1979562a10e5b') version('3.2.1', 'c2aac8b40f84e08e7f8c9068de9239a3') @@ -67,6 +68,8 @@ class R(Package): depends_on('freetype') depends_on('tcl') depends_on('tk') + depends_on('curl') + depends_on('pcre') def install(self, spec, prefix): rlibdir = join_path(prefix, 'rlib') From cb3505769b57e9f7c06f42faf8b88dfb40db7ec9 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sat, 28 May 2016 22:31:47 -0500 Subject: [PATCH 03/12] Clean up R extensions Run the existing R extension packages through autopep8 to clean up. --- var/spack/repos/builtin/packages/r-BiocGenerics/package.py | 6 ++++-- var/spack/repos/builtin/packages/r-abind/package.py | 6 ++++-- var/spack/repos/builtin/packages/r-filehash/package.py | 6 ++++-- var/spack/repos/builtin/packages/r-magic/package.py | 6 ++++-- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/var/spack/repos/builtin/packages/r-BiocGenerics/package.py b/var/spack/repos/builtin/packages/r-BiocGenerics/package.py index 0d3b6a3e57..1d994cc2ef 100644 --- a/var/spack/repos/builtin/packages/r-BiocGenerics/package.py +++ b/var/spack/repos/builtin/packages/r-BiocGenerics/package.py @@ -24,15 +24,17 @@ ############################################################################## from spack import * + class RBiocgenerics(Package): """S4 generic functions needed by many Bioconductor packages.""" homepage = 'https://www.bioconductor.org/packages/release/bioc/html/BiocGenerics.html' - url = "https://www.bioconductor.org/packages/release/bioc/src/contrib/BiocGenerics_0.16.1.tar.gz" + url = "https://www.bioconductor.org/packages/release/bioc/src/contrib/BiocGenerics_0.16.1.tar.gz" version('0.16.1', 'c2148ffd86fc6f1f819c7f68eb2c744f', expand=False) extends('R') def install(self, spec, prefix): - R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file) + R('CMD', 'INSTALL', '--library=%s' % + self.module.r_lib_dir, '%s' % self.stage.archive_file) diff --git a/var/spack/repos/builtin/packages/r-abind/package.py b/var/spack/repos/builtin/packages/r-abind/package.py index 34a1eee79f..f9ac684aa4 100644 --- a/var/spack/repos/builtin/packages/r-abind/package.py +++ b/var/spack/repos/builtin/packages/r-abind/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class RAbind(Package): """Combine multidimensional arrays into a single array. This is a generalization of 'cbind' and 'rbind'. Works with vectors, matrices, and @@ -31,7 +32,7 @@ class RAbind(Package): 'afill' for manipulating, extracting and replacing data in arrays.""" homepage = "https://cran.r-project.org/" - url = "https://cran.r-project.org/src/contrib/abind_1.4-3.tar.gz" + url = "https://cran.r-project.org/src/contrib/abind_1.4-3.tar.gz" version('1.4-3', '10fcf80c677b991bf263d38be35a1fc5', expand=False) @@ -39,4 +40,5 @@ class RAbind(Package): def install(self, spec, prefix): - R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file) + R('CMD', 'INSTALL', '--library=%s' % + self.module.r_lib_dir, '%s' % self.stage.archive_file) diff --git a/var/spack/repos/builtin/packages/r-filehash/package.py b/var/spack/repos/builtin/packages/r-filehash/package.py index fffae68019..e59ba18fa3 100644 --- a/var/spack/repos/builtin/packages/r-filehash/package.py +++ b/var/spack/repos/builtin/packages/r-filehash/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class RFilehash(Package): """Implements a simple key-value style database where character string keys are associated with data values that are stored on the disk. A simple @@ -36,11 +37,12 @@ class RFilehash(Package): parties for use in the 'filehash' framework.""" homepage = 'https://cran.r-project.org/' - url = "https://cran.r-project.org/src/contrib/filehash_2.3.tar.gz" + url = "https://cran.r-project.org/src/contrib/filehash_2.3.tar.gz" version('2.3', '01fffafe09b148ccadc9814c103bdc2f', expand=False) extends('R') def install(self, spec, prefix): - R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file) + R('CMD', 'INSTALL', '--library=%s' % + self.module.r_lib_dir, '%s' % self.stage.archive_file) diff --git a/var/spack/repos/builtin/packages/r-magic/package.py b/var/spack/repos/builtin/packages/r-magic/package.py index f86917ec0c..ec4b9b9e41 100644 --- a/var/spack/repos/builtin/packages/r-magic/package.py +++ b/var/spack/repos/builtin/packages/r-magic/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class RMagic(Package): """A collection of efficient, vectorized algorithms for the creation and investigation of magic squares and hypercubes, including a variety of @@ -31,7 +32,7 @@ class RMagic(Package): arrays.""" homepage = "https://cran.r-project.org/" - url = "https://cran.r-project.org/src/contrib/magic_1.5-6.tar.gz" + url = "https://cran.r-project.org/src/contrib/magic_1.5-6.tar.gz" version('1.5-6', 'a68e5ced253b2196af842e1fc84fd029', expand=False) @@ -40,4 +41,5 @@ class RMagic(Package): depends_on('r-abind') def install(self, spec, prefix): - R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file) + R('CMD', 'INSTALL', '--library=%s' % + self.module.r_lib_dir, '%s' % self.stage.archive_file) From fe256870b47d8b0381c918e54a45c46229506bad Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sun, 29 May 2016 15:26:34 -0500 Subject: [PATCH 04/12] Add variant for UTF support to pcre This will build PCRE with UTF support by default. That seems to be reasonable for most environments. --- var/spack/repos/builtin/packages/pcre/package.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/pcre/package.py b/var/spack/repos/builtin/packages/pcre/package.py index 8e0f83110e..53b23a203d 100644 --- a/var/spack/repos/builtin/packages/pcre/package.py +++ b/var/spack/repos/builtin/packages/pcre/package.py @@ -29,6 +29,7 @@ class Pcre(Package): """The PCRE package contains Perl Compatible Regular Expression libraries. These are useful for implementing regular expression pattern matching using the same syntax and semantics as Perl 5.""" + homepage = "http://www.pcre.org""" url = "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.36.tar.bz2" @@ -37,7 +38,14 @@ class Pcre(Package): patch("intel.patch") + variant('utf', default=True, + description='Enable support for UTF-8/16/32, incompatible with EBCDIC.') + def install(self, spec, prefix): - configure("--prefix=%s" % prefix) + configure_args = ['--prefix=%s' % prefix] + if '+utf' in spec: + configure_args.append('--enable-utf') + + configure(*configure_args) make() make("install") From 8704a4ed35b5868a62cde613d85c3eeae27e5a5e Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sun, 29 May 2016 16:06:03 -0500 Subject: [PATCH 05/12] Use configure_args rather than options Replaced 'options' with 'configure_args'. That seems like a better name and is consistent with the packaging guide. --- var/spack/repos/builtin/packages/R/package.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/var/spack/repos/builtin/packages/R/package.py b/var/spack/repos/builtin/packages/R/package.py index f4728bfd64..af520082ec 100644 --- a/var/spack/repos/builtin/packages/R/package.py +++ b/var/spack/repos/builtin/packages/R/package.py @@ -73,15 +73,15 @@ class R(Package): def install(self, spec, prefix): rlibdir = join_path(prefix, 'rlib') - options = ['--prefix=%s' % prefix, - '--libdir=%s' % rlibdir, - '--enable-R-shlib', - '--enable-BLAS-shlib', - '--enable-R-framework=no'] + configure_args = ['--prefix=%s' % prefix, + '--libdir=%s' % rlibdir, + '--enable-R-shlib', + '--enable-BLAS-shlib', + '--enable-R-framework=no'] if '+external-lapack' in spec: - options.extend(['--with-blas', '--with-lapack']) + configure_args.extend(['--with-blas', '--with-lapack']) - configure(*options) + configure(*configure_args) make() make('install') @@ -111,7 +111,7 @@ def setup_dependent_environment(self, spack_env, run_env, extension_spec): extension_spec.prefix, self.r_lib_dir)) def setup_dependent_package(self, module, ext_spec): - """Called before R modules' install() methods. In most cases, + """Called before R modules' install() methods. In most cases, extensions will only need to have one line: R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file)""" From 37dc13edaf92c9fa45c0b82c736f5b40ed8172f7 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sun, 29 May 2016 17:03:38 -0500 Subject: [PATCH 06/12] Update version of BiocGenerics The BioConductor repositories only keep the most recent version so this has to be bumped. --- var/spack/repos/builtin/packages/r-BiocGenerics/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/r-BiocGenerics/package.py b/var/spack/repos/builtin/packages/r-BiocGenerics/package.py index 1d994cc2ef..16a8027e3c 100644 --- a/var/spack/repos/builtin/packages/r-BiocGenerics/package.py +++ b/var/spack/repos/builtin/packages/r-BiocGenerics/package.py @@ -31,7 +31,7 @@ class RBiocgenerics(Package): homepage = 'https://www.bioconductor.org/packages/release/bioc/html/BiocGenerics.html' url = "https://www.bioconductor.org/packages/release/bioc/src/contrib/BiocGenerics_0.16.1.tar.gz" - version('0.16.1', 'c2148ffd86fc6f1f819c7f68eb2c744f', expand=False) + version('0.18.0', 'baaff00eb2c2b15396fed2f7f43e634c', expand=False) extends('R') From 0e64c25ffc09d764eaeb11ffb0db93bb8baaf34a Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sun, 29 May 2016 17:40:26 -0500 Subject: [PATCH 07/12] Fix flake8 errors Use Bioconductor provided Short URL for homepage in BiocGenerics. Wrap description text for utf variant in pcre. --- var/spack/repos/builtin/packages/pcre/package.py | 3 ++- var/spack/repos/builtin/packages/r-BiocGenerics/package.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/pcre/package.py b/var/spack/repos/builtin/packages/pcre/package.py index 53b23a203d..a43729a1ac 100644 --- a/var/spack/repos/builtin/packages/pcre/package.py +++ b/var/spack/repos/builtin/packages/pcre/package.py @@ -39,7 +39,8 @@ class Pcre(Package): patch("intel.patch") variant('utf', default=True, - description='Enable support for UTF-8/16/32, incompatible with EBCDIC.') + description='Enable support for UTF-8/16/32, ' + 'incompatible with EBCDIC.') def install(self, spec, prefix): configure_args = ['--prefix=%s' % prefix] diff --git a/var/spack/repos/builtin/packages/r-BiocGenerics/package.py b/var/spack/repos/builtin/packages/r-BiocGenerics/package.py index 16a8027e3c..d509bc3d84 100644 --- a/var/spack/repos/builtin/packages/r-BiocGenerics/package.py +++ b/var/spack/repos/builtin/packages/r-BiocGenerics/package.py @@ -28,8 +28,8 @@ class RBiocgenerics(Package): """S4 generic functions needed by many Bioconductor packages.""" - homepage = 'https://www.bioconductor.org/packages/release/bioc/html/BiocGenerics.html' - url = "https://www.bioconductor.org/packages/release/bioc/src/contrib/BiocGenerics_0.16.1.tar.gz" + homepage = 'https://bioconductor.org/packages/BiocGenerics/' + url = 'https://www.bioconductor.org/packages/release/bioc/src/contrib/BiocGenerics_0.18.0.tar.gz' version('0.18.0', 'baaff00eb2c2b15396fed2f7f43e634c', expand=False) From 7213b123245895ab3fe588c7b5656b68f648b99d Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sun, 5 Jun 2016 20:12:11 -0500 Subject: [PATCH 08/12] Tweak how R packages are built. Add bzip2 as a dependency to base R. Switch from installing the R packages from tar files to installing from the extracted directory. This is more in line with a standard install and also allows installing from VCS. Use the Bioconductor version for BiocGenerics and future Bioconductor packages. Suffix the package with 'bioc-$version' to indicate which Bioconductor release the package is a part of. This is actually more important than the actual version attached to individual packages although those are subject to change within the Bioconductor branch. --- var/spack/repos/builtin/packages/R/package.py | 1 + .../repos/builtin/packages/r-BiocGenerics/package.py | 11 +++++++---- var/spack/repos/builtin/packages/r-abind/package.py | 4 ++-- .../repos/builtin/packages/r-filehash/package.py | 4 ++-- var/spack/repos/builtin/packages/r-magic/package.py | 4 ++-- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/R/package.py b/var/spack/repos/builtin/packages/R/package.py index af520082ec..74dd95e5c2 100644 --- a/var/spack/repos/builtin/packages/R/package.py +++ b/var/spack/repos/builtin/packages/R/package.py @@ -61,6 +61,7 @@ class R(Package): depends_on('icu') depends_on('glib') depends_on('zlib') + depends_on('bzip2') depends_on('libtiff') depends_on('jpeg') depends_on('cairo') diff --git a/var/spack/repos/builtin/packages/r-BiocGenerics/package.py b/var/spack/repos/builtin/packages/r-BiocGenerics/package.py index d509bc3d84..ffd578a42c 100644 --- a/var/spack/repos/builtin/packages/r-BiocGenerics/package.py +++ b/var/spack/repos/builtin/packages/r-BiocGenerics/package.py @@ -29,12 +29,15 @@ class RBiocgenerics(Package): """S4 generic functions needed by many Bioconductor packages.""" homepage = 'https://bioconductor.org/packages/BiocGenerics/' - url = 'https://www.bioconductor.org/packages/release/bioc/src/contrib/BiocGenerics_0.18.0.tar.gz' - - version('0.18.0', 'baaff00eb2c2b15396fed2f7f43e634c', expand=False) + version('bioc-3.3', + git='https://github.com/Bioconductor-mirror/BiocGenerics.git', + branch='release-3.3') + version('bioc-3.2', + git='https://github.com/Bioconductor-mirror/BiocGenerics.git', + branch='release-3.2') extends('R') def install(self, spec, prefix): R('CMD', 'INSTALL', '--library=%s' % - self.module.r_lib_dir, '%s' % self.stage.archive_file) + self.module.r_lib_dir, '%s' % self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-abind/package.py b/var/spack/repos/builtin/packages/r-abind/package.py index f9ac684aa4..b67a06d9b5 100644 --- a/var/spack/repos/builtin/packages/r-abind/package.py +++ b/var/spack/repos/builtin/packages/r-abind/package.py @@ -34,11 +34,11 @@ class RAbind(Package): homepage = "https://cran.r-project.org/" url = "https://cran.r-project.org/src/contrib/abind_1.4-3.tar.gz" - version('1.4-3', '10fcf80c677b991bf263d38be35a1fc5', expand=False) + version('1.4-3', '10fcf80c677b991bf263d38be35a1fc5') extends('R') def install(self, spec, prefix): R('CMD', 'INSTALL', '--library=%s' % - self.module.r_lib_dir, '%s' % self.stage.archive_file) + self.module.r_lib_dir, '%s' % self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-filehash/package.py b/var/spack/repos/builtin/packages/r-filehash/package.py index e59ba18fa3..924066e063 100644 --- a/var/spack/repos/builtin/packages/r-filehash/package.py +++ b/var/spack/repos/builtin/packages/r-filehash/package.py @@ -39,10 +39,10 @@ class RFilehash(Package): homepage = 'https://cran.r-project.org/' url = "https://cran.r-project.org/src/contrib/filehash_2.3.tar.gz" - version('2.3', '01fffafe09b148ccadc9814c103bdc2f', expand=False) + version('2.3', '01fffafe09b148ccadc9814c103bdc2f') extends('R') def install(self, spec, prefix): R('CMD', 'INSTALL', '--library=%s' % - self.module.r_lib_dir, '%s' % self.stage.archive_file) + self.module.r_lib_dir, '%s' % self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-magic/package.py b/var/spack/repos/builtin/packages/r-magic/package.py index ec4b9b9e41..31dab3b8af 100644 --- a/var/spack/repos/builtin/packages/r-magic/package.py +++ b/var/spack/repos/builtin/packages/r-magic/package.py @@ -34,7 +34,7 @@ class RMagic(Package): homepage = "https://cran.r-project.org/" url = "https://cran.r-project.org/src/contrib/magic_1.5-6.tar.gz" - version('1.5-6', 'a68e5ced253b2196af842e1fc84fd029', expand=False) + version('1.5-6', 'a68e5ced253b2196af842e1fc84fd029') extends('R') @@ -42,4 +42,4 @@ class RMagic(Package): def install(self, spec, prefix): R('CMD', 'INSTALL', '--library=%s' % - self.module.r_lib_dir, '%s' % self.stage.archive_file) + self.module.r_lib_dir, '%s' % self.stage.source_path) From 7da405e630b6b0e65f4ec8d551a4ed988f32ac74 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Mon, 6 Jun 2016 17:06:50 -0500 Subject: [PATCH 09/12] Add validator for bioconductor packages This commit adds a validator function to make sure the versions of R and bioconductor are in sync. --- .../builtin/packages/r-BiocGenerics/package.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/var/spack/repos/builtin/packages/r-BiocGenerics/package.py b/var/spack/repos/builtin/packages/r-BiocGenerics/package.py index ffd578a42c..5a6ce72a4b 100644 --- a/var/spack/repos/builtin/packages/r-BiocGenerics/package.py +++ b/var/spack/repos/builtin/packages/r-BiocGenerics/package.py @@ -38,6 +38,19 @@ class RBiocgenerics(Package): extends('R') + def validate(self, spec): + """ + Checks that the version of R is appropriate for the Bioconductor + version. + """ + if spec.satisfies('@bioc-3.3'): + if not spec.satisfies('^R@3.3.0:3.3.9'): + raise InstallError('Must use R-3.3 for Bioconductor-3.3') + elif spec.satisfies('@bioc-3.2'): + if not spec.satisfies('^R@3.2.0:3.2.9'): + raise InstallError('Must use R-3.2 for Bioconductor-3.2') + def install(self, spec, prefix): + self.validate(spec) R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.source_path) From 4850b9d4d1446f96732e27053df50c16629ec448 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Mon, 6 Jun 2016 17:30:35 -0500 Subject: [PATCH 10/12] Make install comment consistent with actual call. --- var/spack/repos/builtin/packages/R/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/R/package.py b/var/spack/repos/builtin/packages/R/package.py index 74dd95e5c2..c7d8f89906 100644 --- a/var/spack/repos/builtin/packages/R/package.py +++ b/var/spack/repos/builtin/packages/R/package.py @@ -115,7 +115,7 @@ def setup_dependent_package(self, module, ext_spec): """Called before R modules' install() methods. In most cases, extensions will only need to have one line: R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % - self.stage.archive_file)""" + self.stage.source_path)""" # R extension builds can have a global R executable function module.R = Executable(join_path(self.spec.prefix.bin, 'R')) From a813f03955397140104b7d926f0fddf925e672bc Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sat, 11 Jun 2016 16:18:54 -0500 Subject: [PATCH 11/12] Add list_url for old versions. --- var/spack/repos/builtin/packages/r-abind/package.py | 8 ++++---- var/spack/repos/builtin/packages/r-filehash/package.py | 7 ++++--- var/spack/repos/builtin/packages/r-magic/package.py | 7 ++++--- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/r-abind/package.py b/var/spack/repos/builtin/packages/r-abind/package.py index b67a06d9b5..96f623a096 100644 --- a/var/spack/repos/builtin/packages/r-abind/package.py +++ b/var/spack/repos/builtin/packages/r-abind/package.py @@ -32,13 +32,13 @@ class RAbind(Package): 'afill' for manipulating, extracting and replacing data in arrays.""" homepage = "https://cran.r-project.org/" - url = "https://cran.r-project.org/src/contrib/abind_1.4-3.tar.gz" + url = "https://cran.r-project.org/src/contrib/abind_1.4-3.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/abind" version('1.4-3', '10fcf80c677b991bf263d38be35a1fc5') extends('R') def install(self, spec, prefix): - - R('CMD', 'INSTALL', '--library=%s' % - self.module.r_lib_dir, '%s' % self.stage.source_path) + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-filehash/package.py b/var/spack/repos/builtin/packages/r-filehash/package.py index 924066e063..a09b458eaf 100644 --- a/var/spack/repos/builtin/packages/r-filehash/package.py +++ b/var/spack/repos/builtin/packages/r-filehash/package.py @@ -37,12 +37,13 @@ class RFilehash(Package): parties for use in the 'filehash' framework.""" homepage = 'https://cran.r-project.org/' - url = "https://cran.r-project.org/src/contrib/filehash_2.3.tar.gz" + url = "https://cran.r-project.org/src/contrib/filehash_2.3.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/filehash" version('2.3', '01fffafe09b148ccadc9814c103bdc2f') extends('R') def install(self, spec, prefix): - R('CMD', 'INSTALL', '--library=%s' % - self.module.r_lib_dir, '%s' % self.stage.source_path) + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-magic/package.py b/var/spack/repos/builtin/packages/r-magic/package.py index 31dab3b8af..f6ba97740b 100644 --- a/var/spack/repos/builtin/packages/r-magic/package.py +++ b/var/spack/repos/builtin/packages/r-magic/package.py @@ -32,7 +32,8 @@ class RMagic(Package): arrays.""" homepage = "https://cran.r-project.org/" - url = "https://cran.r-project.org/src/contrib/magic_1.5-6.tar.gz" + url = "https://cran.r-project.org/src/contrib/magic_1.5-6.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/magic" version('1.5-6', 'a68e5ced253b2196af842e1fc84fd029') @@ -41,5 +42,5 @@ class RMagic(Package): depends_on('r-abind') def install(self, spec, prefix): - R('CMD', 'INSTALL', '--library=%s' % - self.module.r_lib_dir, '%s' % self.stage.source_path) + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) From 8970785d33e07105f47bca390d846127d7e5ce7b Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Mon, 13 Jun 2016 17:22:44 -0500 Subject: [PATCH 12/12] Add 'jdk' as a dependency. Add jdk as a dependency so that R has support for java and allow packages that need java to work. --- var/spack/repos/builtin/packages/R/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/R/package.py b/var/spack/repos/builtin/packages/R/package.py index c7d8f89906..001dde5329 100644 --- a/var/spack/repos/builtin/packages/R/package.py +++ b/var/spack/repos/builtin/packages/R/package.py @@ -71,6 +71,7 @@ class R(Package): depends_on('tk') depends_on('curl') depends_on('pcre') + depends_on('jdk') def install(self, spec, prefix): rlibdir = join_path(prefix, 'rlib')