Changeset: 588234dc7667 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=588234dc7667
Modified Files:
        testing/Mtest.py.in
Branch: Jun2016
Log Message:

Create private R library directory if it doesn't exist.


diffs (21 lines):

diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -3701,6 +3701,17 @@ def main(argv) :
     # hence, we set them at runtime.
     # X == true   =>  @X_TRUE@='',  @X_FALSE@='#'
     # X == false  =>  @X_TRUE@='#', @X_FALSE@=''
+    if CONDITIONALS['HAVE_LIBR'] and CheckExec('R'):
+        proc = process.Popen(['R', '--slave', '--no-save', '--no-restore',
+                              '-e', 'print(Sys.getenv("R_LIBS_USER"))'],
+                             stdout = process.PIPE, stderr = process.PIPE,
+                             universal_newlines = True)
+        r_out, r_err = proc.communicate()
+        res = re.search(r'\[\d+\] "(?P<dir>.*)"', r_out)
+        if res is not None:
+            rdir = os.path.expanduser(res.group('dir'))
+            if not os.path.exists(rdir):
+                os.makedirs(rdir)
     if CheckExec('php'):
         CONDITIONALS['HAVE_PHP'] = '#'
 #     else:
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to