Merge pull request #82773 from timokau/rpy2-pandas-1.x

python3.pkgs.rpy2: fix tests with pandas 1.x, 3.2.5 -> 3.2.6
This commit is contained in:
Timo Kaufmann 2020-03-17 11:16:30 +00:00 committed by GitHub
commit 4ad4523600
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,6 +1,7 @@
{ lib
, python
, buildPythonPackage
, fetchpatch
, fetchPypi
, isPyPy
, R
@ -24,13 +25,13 @@
}:
buildPythonPackage rec {
version = "3.2.5";
version = "3.2.6";
pname = "rpy2";
disabled = isPyPy;
src = fetchPypi {
inherit version pname;
sha256 = "0pnk363klic4smb3jnkm4lnh984c2cpqzawrg2j52hgy8k1bgyrk";
sha256 = "1p990cqx3p2pd1rc9wn66m56wahaq8dlr88frz49vb7nv4zw4a8q";
};
buildInputs = [
@ -68,6 +69,14 @@ 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"