Merge pull request #297679 from collares/rpy2-unbreak

python311Packages.rpy2: adapt tests to pytest 8
This commit is contained in:
Mauricio Collares 2024-03-21 11:47:03 +01:00 committed by GitHub
commit 6699e5f037
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,6 +2,7 @@
, lib , lib
, buildPythonPackage , buildPythonPackage
, fetchPypi , fetchPypi
, fetchpatch
, isPyPy , isPyPy
, R , R
, rWrapper , rWrapper
@ -38,6 +39,12 @@ buildPythonPackage rec {
# R_LIBS_SITE is used by the nix r package to point to the installed R libraries. # 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. # This patch sets R_LIBS_SITE when rpy2 is imported.
./rpy2-3.x-r-libs-site.patch ./rpy2-3.x-r-libs-site.patch
# https://github.com/rpy2/rpy2/pull/1094
(fetchpatch {
url = "https://github.com/rpy2/rpy2/commit/026d069a008163a62d12567bcb938410d0f9bf7a.diff";
hash = "sha256-x778upSY3zab5EiRyOcsbDpPj7vN/7XzefEs+wvkNg0=";
})
]; ];
postPatch = '' postPatch = ''
@ -82,10 +89,6 @@ buildPythonPackage rec {
doCheck = !stdenv.isDarwin; doCheck = !stdenv.isDarwin;
# newlines in environment variables are a problem due to
# https://github.com/rpy2/rpy2/issues/1066
preCheck = "unset postPatch";
nativeCheckInputs = [ nativeCheckInputs = [
pytestCheckHook pytestCheckHook
]; ];