Support Suggests/Depends/Imports in DESCRIPTION.
This commit is contained in:
parent
4fbc36c7ff
commit
a3f7f8ba21
1 changed files with 11 additions and 3 deletions
|
@ -449,6 +449,8 @@ class Gradle(BuildSystem):
|
||||||
|
|
||||||
class R(BuildSystem):
|
class R(BuildSystem):
|
||||||
|
|
||||||
|
# https://r-pkgs.org/description.html
|
||||||
|
|
||||||
name = "R"
|
name = "R"
|
||||||
|
|
||||||
def __init__(self, path):
|
def __init__(self, path):
|
||||||
|
@ -481,11 +483,17 @@ class R(BuildSystem):
|
||||||
return BytesParser().parse(f)
|
return BytesParser().parse(f)
|
||||||
|
|
||||||
def get_declared_dependencies(self, session, fixers=None):
|
def get_declared_dependencies(self, session, fixers=None):
|
||||||
|
def parse_list(t):
|
||||||
|
return [s.strip() for s in t.split(',') if s.strip()]
|
||||||
description = self._read_description()
|
description = self._read_description()
|
||||||
if 'Suggests' in description:
|
if 'Suggests' in description:
|
||||||
suggests = [s.strip() for s in description['Suggests'].split(',') if s.strip()]
|
for s in parse_list(description['Suggests']):
|
||||||
for s in suggests:
|
yield "build", RPackageRequirement.from_str(s)
|
||||||
# TODO(jelmer): Look at version
|
if 'Depends' in description:
|
||||||
|
for s in parse_list(description['Depends']):
|
||||||
|
yield "build", RPackageRequirement.from_str(s)
|
||||||
|
if 'Imports' in description:
|
||||||
|
for s in parse_list(description['Imports']):
|
||||||
yield "build", RPackageRequirement.from_str(s)
|
yield "build", RPackageRequirement.from_str(s)
|
||||||
|
|
||||||
def get_declared_outputs(self, session, fixers=None):
|
def get_declared_outputs(self, session, fixers=None):
|
||||||
|
|
Loading…
Add table
Reference in a new issue