|
@@ -408,11 +408,14 @@ def importR():
|
|
|
if not haveRpy2:
|
|
|
sys.exit(1)
|
|
|
|
|
|
- # R packages check.
|
|
|
- # @FIXME: it leaves a Rtmpxxxx folder into the make tempfolder and causes make complain. [markus]
|
|
|
+ # R packages check. Will create one error message after check of all packages.
|
|
|
+ missingPackagesList = []
|
|
|
for each in ["gstat", "spgrass6", "maptools"]:
|
|
|
if not robjects.r.require(each, quietly = True)[0]:
|
|
|
- sys.exit(_("R package '%s' is missing. Install it and re-run v.krige.") % each)
|
|
|
+ missingPackagesList.append(each)
|
|
|
+ if missingPackagesList:
|
|
|
+ errorString = "R package(s) " + " ".join(["%s" % e for e in missingPackagesList] + "missing. Install it/them and re-run v.krige.")
|
|
|
+ sys.exit(_(errorString))
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
if len(sys.argv) > 1:
|