From 2262bc95f1139e8599b061474569fab69d57a7f4 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Tue, 7 Jun 2016 22:04:11 -0500 Subject: [PATCH 1/4] new package: r-packrat Manage the R packages your project depends on in an isolated, portable, and reproducible way. https://github.com/rstudio/packrat/ --- .../builtin/packages/r-packrat/package.py | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 var/spack/repos/builtin/packages/r-packrat/package.py diff --git a/var/spack/repos/builtin/packages/r-packrat/package.py b/var/spack/repos/builtin/packages/r-packrat/package.py new file mode 100644 index 0000000000..f7cebf9d49 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-packrat/package.py @@ -0,0 +1,41 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RPackrat(Package): + """Manage the R packages your project depends on in an isolated, portable, + and reproducible way.""" + + homepage = 'https://github.com/rstudio/packrat/' + url = "https://cran.r-project.org/src/contrib/packrat_0.4.7-1.tar.gz" + + version('0.4.7-1', '80c2413269b292ade163a70ba5053e84') + + extends('R') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', + '--library={0}'.format(self.module.r_lib_dir), self.stage.source_path) From bb19dffb266ab63ff8733051a4461ecdb85bd18f Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Tue, 7 Jun 2016 23:40:12 -0500 Subject: [PATCH 2/4] Fix flake8 error. --- var/spack/repos/builtin/packages/r-packrat/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/r-packrat/package.py b/var/spack/repos/builtin/packages/r-packrat/package.py index f7cebf9d49..c9b02a284e 100644 --- a/var/spack/repos/builtin/packages/r-packrat/package.py +++ b/var/spack/repos/builtin/packages/r-packrat/package.py @@ -37,5 +37,5 @@ class RPackrat(Package): extends('R') def install(self, spec, prefix): - R('CMD', 'INSTALL', - '--library={0}'.format(self.module.r_lib_dir), self.stage.source_path) + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) From 6c0ea77d1d5e349329ad36aecaadff13c0ccf6c4 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sat, 11 Jun 2016 15:36:43 -0500 Subject: [PATCH 3/4] Add list_url for older versions. --- var/spack/repos/builtin/packages/r-packrat/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/r-packrat/package.py b/var/spack/repos/builtin/packages/r-packrat/package.py index c9b02a284e..1fa62da5d4 100644 --- a/var/spack/repos/builtin/packages/r-packrat/package.py +++ b/var/spack/repos/builtin/packages/r-packrat/package.py @@ -30,7 +30,8 @@ class RPackrat(Package): and reproducible way.""" homepage = 'https://github.com/rstudio/packrat/' - url = "https://cran.r-project.org/src/contrib/packrat_0.4.7-1.tar.gz" + url = "https://cran.r-project.org/src/contrib/packrat_0.4.7-1.tar.gz" + list_url = 'https://cran.r-project.org/src/contrib/Archive/packrat' version('0.4.7-1', '80c2413269b292ade163a70ba5053e84') From 59c9816dbf6e8979a6cfcb28ecb244e92f70f2e6 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sat, 11 Jun 2016 16:01:23 -0500 Subject: [PATCH 4/4] Make quotations in variables consistent. --- var/spack/repos/builtin/packages/r-packrat/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/r-packrat/package.py b/var/spack/repos/builtin/packages/r-packrat/package.py index 1fa62da5d4..9520952bd7 100644 --- a/var/spack/repos/builtin/packages/r-packrat/package.py +++ b/var/spack/repos/builtin/packages/r-packrat/package.py @@ -29,9 +29,9 @@ class RPackrat(Package): """Manage the R packages your project depends on in an isolated, portable, and reproducible way.""" - homepage = 'https://github.com/rstudio/packrat/' + homepage = "https://github.com/rstudio/packrat/" url = "https://cran.r-project.org/src/contrib/packrat_0.4.7-1.tar.gz" - list_url = 'https://cran.r-project.org/src/contrib/Archive/packrat' + list_url = "https://cran.r-project.org/src/contrib/Archive/packrat" version('0.4.7-1', '80c2413269b292ade163a70ba5053e84')