1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-14 16:46:09 +00:00
nixpkgs/pkgs/development/python-modules/rpy2/r-libs-site.patch
Timo Kaufmann 63b39af496
pythonPackages.rpy2: various fixes (#51084)
- make sure libreadline is found at runtime
- make sure python libraries are found at runtime
- add libraries necessary to pass the testsuite and standard libraries
2018-11-27 18:24:37 +01:00

21 lines
553 B
Diff

diff --git a/rpy/rinterface/__init__.py b/rpy/rinterface/__init__.py
index 9362e57..1af258e 100644
--- a/rpy/rinterface/__init__.py
+++ b/rpy/rinterface/__init__.py
@@ -43,6 +43,15 @@ if not R_HOME:
if not os.environ.get("R_HOME"):
os.environ['R_HOME'] = 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
+
if sys.platform == 'win32':
_load_r_dll(R_HOME)