diff options
author | Glenn Johnson <glenn-johnson@uiowa.edu> | 2016-04-06 16:44:22 -0500 |
---|---|---|
committer | Glenn Johnson <glenn-johnson@uiowa.edu> | 2016-04-06 16:44:22 -0500 |
commit | fbabfc593d10a7fc35944e72e2eb8b1ebf4818eb (patch) | |
tree | b7437c674bcd89eb2174bbbe66d5ab7081085db0 /lib | |
parent | 8ef9d685427e60ce5af660be5f27d36683ea8845 (diff) | |
download | spack-fbabfc593d10a7fc35944e72e2eb8b1ebf4818eb.tar.gz spack-fbabfc593d10a7fc35944e72e2eb8b1ebf4818eb.tar.bz2 spack-fbabfc593d10a7fc35944e72e2eb8b1ebf4818eb.tar.xz spack-fbabfc593d10a7fc35944e72e2eb8b1ebf4818eb.zip |
Make R extensable and add a couple of packages for verification.
Added R as a build system so that the create template will have the
correct configure line.
Added a regex for version parsing as the R URLs are a little odd.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/cmd/create.py | 8 | ||||
-rw-r--r-- | lib/spack/spack/url.py | 3 |
2 files changed, 10 insertions, 1 deletions
diff --git a/lib/spack/spack/cmd/create.py b/lib/spack/spack/cmd/create.py index f0cd50b8df..e3a31806ab 100644 --- a/lib/spack/spack/cmd/create.py +++ b/lib/spack/spack/cmd/create.py @@ -124,10 +124,12 @@ class ConfigureGuesser(object): autotools = "configure('--prefix=%s' % prefix)" cmake = "cmake('.', *std_cmake_args)" python = "python('setup.py', 'install', '--prefix=%s' % prefix)" + r = "R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file)" config_lines = ((r'/configure$', 'autotools', autotools), (r'/CMakeLists.txt$', 'cmake', cmake), - (r'/setup.py$', 'python', python)) + (r'/setup.py$', 'python', python), + (r'/NAMESPACE$', 'r', r)) # Peek inside the tarball. tar = which('tar') @@ -272,6 +274,10 @@ def create(parser, args): if guesser.build_system == 'python': name = 'py-%s' % name + # Prepend 'r-' to R package names, by convention. + if guesser.build_system == 'r': + name = 'r-%s' % name + # Create a directory for the new package. pkg_path = repo.filename_for_package_name(name) if os.path.exists(pkg_path) and not args.force: diff --git a/lib/spack/spack/url.py b/lib/spack/spack/url.py index f51f05cad7..b4fb70d6fb 100644 --- a/lib/spack/spack/url.py +++ b/lib/spack/spack/url.py @@ -206,6 +206,9 @@ def parse_version_offset(path): # e.g. lame-398-1 (r'-((\d)+-\d)', stem), + # e.g. foobar_1.2-3 + (r'_((\d+\.)+\d+(-\d+)?)', stem), + # e.g. foobar-4.5.1 (r'-((\d+\.)*\d+)$', stem), |