RPackage: allow empty Depends/Imports

This commit is contained in:
Wouter Deconinck 2024-08-22 22:41:12 -05:00
parent ee7025755a
commit cd3d2791f9

View File

@ -55,9 +55,9 @@ def install(self, pkg, spec, prefix):
with open(fs.join_path(self.stage.source_path, 'DESCRIPTION')) as file:
for desc in pycran.parse(file.read()):
if "Imports" in desc:
r_deps.extend([d.strip() for d in desc["Imports"].split(",")])
r_deps.extend([d.strip() for d in desc["Imports"].split(",") if d != ""])
if "Depends" in desc:
r_deps.extend([d.strip() for d in desc["Depends"].split(",")])
r_deps.extend([d.strip() for d in desc["Depends"].split(",") if d != ""])
# Convert to spack dependencies format for comparison
deps = {}