Skip to content

Commit

Permalink
pythonPackages.rpy2: 3.2.6 -> 3.3.6, fix test etc.
Browse files Browse the repository at this point in the history
- This newer version is compatible with panda 1.0 without any patch.
- rPackages.lazyload is required to run tests.
- The official website is moved to GitHub Pages.

Signed-off-by: Masanori Ogino <167209+omasanori@users.noreply.github.com>
  • Loading branch information
omasanori committed Nov 6, 2020
1 parent 76d4a93 commit 4a2a6b4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
15 changes: 4 additions & 11 deletions pkgs/development/python-modules/rpy2/default.nix
Expand Up @@ -25,13 +25,13 @@
}:

buildPythonPackage rec {
version = "3.2.6";
version = "3.3.6";
pname = "rpy2";

disabled = isPyPy;
src = fetchPypi {
inherit version pname;
sha256 = "1p990cqx3p2pd1rc9wn66m56wahaq8dlr88frz49vb7nv4zw4a8q";
sha256 = "0xvfkxvh01r5ibd5mpisp8bz385hgpn27b988y8v65z7hqr3y1nf";
};

buildInputs = [
Expand All @@ -53,6 +53,7 @@ buildPythonPackage rec {
DBI
dbplyr
hexbin
lazyeval
lme4
tidyr
]) ++ extraRPackages ++ rWrapper.recommendedPackages;
Expand All @@ -69,14 +70,6 @@ buildPythonPackage rec {
# R_LIBS_SITE is used by the nix r package to point to the installed R libraries.
# This patch sets R_LIBS_SITE when rpy2 is imported.
./rpy2-3.x-r-libs-site.patch

# pandas 1.x compatibility, already merged upstream
# https://github.com/rpy2/rpy2/issues/636
(fetchpatch {
name = "pandas-1.x.patch";
url = "https://github.com/rpy2/rpy2/commit/fbd060e364b70012e8d26cc74df04ee53f769379.patch";
sha256 = "19rdqydwjmqg25ibmsbx7lggrr9fsyjn283zgvz1wj4iyfjwp1za";
})
];
postPatch = ''
substituteInPlace 'rpy2/rinterface_lib/embedded.py' --replace '@NIX_R_LIBS_SITE@' "$R_LIBS_SITE"
Expand All @@ -98,7 +91,7 @@ buildPythonPackage rec {
];

meta = {
homepage = "http://rpy.sourceforge.net/rpy2";
homepage = "https://rpy2.github.io/";
description = "Python interface to R";
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.unix;
Expand Down
@@ -1,10 +1,10 @@
diff --git a/rpy2/rinterface_lib/embedded.py b/rpy2/rinterface_lib/embedded.py
index cc32b6d..3969ad0 100644
index 1f4babbf..322363c5 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
@@ -118,6 +118,16 @@ def _initr(
if openrlib.R_HOME is None:
raise ValueError('openrlib.R_HOME cannot be None.')
os.environ['R_HOME'] = openrlib.R_HOME
+
+ # path to libraries
Expand Down

0 comments on commit 4a2a6b4

Please sign in to comment.