Merge pull request #757 from glennpj/extend_r

Make R extendable
This commit is contained in:
Todd Gamblin
2016-05-10 01:30:13 -07:00
7 changed files with 141 additions and 2 deletions

View File

@@ -124,10 +124,12 @@ def __call__(self, stage):
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:

View File

@@ -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+)?[a-z]?)', stem),
# e.g. foobar-4.5.1
(r'-((\d+\.)*\d+)$', stem),