Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 21.05 21 lines 827 B view raw
1diff --git a/rpy2/rinterface_lib/embedded.py b/rpy2/rinterface_lib/embedded.py 2index 1f4babbf..322363c5 100644 3--- a/rpy2/rinterface_lib/embedded.py 4+++ b/rpy2/rinterface_lib/embedded.py 5@@ -118,6 +118,16 @@ def _initr( 6 if openrlib.R_HOME is None: 7 raise ValueError('openrlib.R_HOME cannot be None.') 8 os.environ['R_HOME'] = openrlib.R_HOME 9+ 10+ # path to libraries 11+ existing = os.environ.get('R_LIBS_SITE') 12+ if existing is not None: 13+ prefix = existing + ':' 14+ else: 15+ prefix = '' 16+ additional = '@NIX_R_LIBS_SITE@' 17+ os.environ['R_LIBS_SITE'] = prefix + additional 18+ 19 options_c = [ffi.new('char[]', o.encode('ASCII')) for o in _options] 20 n_options = len(options_c) 21 n_options_c = ffi.cast('int', n_options)