python3.pkgs.rpy2: 2.9.5 -> 3.2.2

There have been significant changes, therefore it doesn't make sense
anymore to maintain the python2 and python3 version in the same file.
We'll be able to drop the python2 version soon, some time after we have
switched sage to python3.
This commit is contained in:
Timo Kaufmann
2019-11-28 20:58:59 +01:00
parent f68abbb1c9
commit ef43cd3d42
4 changed files with 155 additions and 34 deletions

View File

@@ -0,0 +1,21 @@
diff --git a/rpy2/rinterface_lib/embedded.py b/rpy2/rinterface_lib/embedded.py
index cc32b6d..3969ad0 100644
--- a/rpy2/rinterface_lib/embedded.py
+++ b/rpy2/rinterface_lib/embedded.py
@@ -113,6 +113,16 @@ def _initr(interactive: bool = True,
if isinitialized():
return None
os.environ['R_HOME'] = openrlib.R_HOME
+
+ # path to libraries
+ existing = os.environ.get('R_LIBS_SITE')
+ if existing is not None:
+ prefix = existing + ':'
+ else:
+ prefix = ''
+ additional = '@NIX_R_LIBS_SITE@'
+ os.environ['R_LIBS_SITE'] = prefix + additional
+
options_c = [ffi.new('char[]', o.encode('ASCII')) for o in _options]
n_options = len(options_c)
n_options_c = ffi.cast('int', n_options)