diff options
Diffstat (limited to 'gn/packages/statistics.scm')
| -rw-r--r-- | gn/packages/statistics.scm | 90 |
1 files changed, 46 insertions, 44 deletions
diff --git a/gn/packages/statistics.scm b/gn/packages/statistics.scm index c391b2d..07d1bec 100644 --- a/gn/packages/statistics.scm +++ b/gn/packages/statistics.scm @@ -80,32 +80,41 @@ combined with QTL information to perform de novo reconstruction of interaction networks.") (license license:gpl3))) +(define rpy2-git-origin + ;; rpy2 >= 3.6.7 handles the removal of the R_nchar C API entry point in + ;; R 4.6; 3.6.2 and older fail to load _rinterface_cffi_api against it. + ;; The two rpy2 source distributions live in this single repository. + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/rpy2/rpy2") + (commit "RELEASE_3_6_7"))) + (file-name (git-file-name "rpy2" "3.6.7")) + (sha256 + (base32 "0py2q283kcsnx4av01x25lxq3cv1m3zd428ns6s21k841l9wi739")))) + (define-public python-rpy2-rinterface (package (name "python-rpy2-rinterface") - (version "3.6.2") - (source - (origin - (method url-fetch) - (uri (pypi-uri "rpy2_rinterface" version)) - (sha256 - (base32 "1hjnc4143dvcrp9m4vnxm4fs2ahiagp5lklsqp1nki341kh0samn")))) + (version "3.6.7") + (source rpy2-git-origin) (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ (chdir "rpy2-rinterface")))))) (propagated-inputs (list python-cffi - python-packaging ;;python-backports-zoneinfo ; needed for python_version<3.9 r-minimal)) - (native-inputs (list zlib - icu4c - libdeflate - python-cffi - python-coverage - python-packaging + (inputs (list icu4c + libdeflate + r-survival + zlib)) + (native-inputs (list python-cffi python-pytest - python-pytest-cov - python-setuptools - python-wheel - r-survival)) + python-setuptools)) (home-page "https://rpy2.github.io/") (synopsis "Low-level interface from Python to the R") (description "Low-level interface for rpy2. rpy2 is an interface to R @@ -115,56 +124,49 @@ interaction networks.") (define-public python-rpy2-robjects (package (name "python-rpy2-robjects") - (version "3.6.1") - (source - (origin - (method url-fetch) - (uri (pypi-uri "rpy2_robjects" version)) - (sha256 - (base32 "0yn4nq26na9hzlm08vsxr050ls5nmngpyma49fpfwc9mhxc7njlk")))) + (version "3.6.7") + (source rpy2-git-origin) (build-system pyproject-build-system) (arguments (list #:phases #~(modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - ;; test_rmagic.py fails with pytest 9: marks on fixtures - ;; are no longer allowed. - (invoke "pytest" "-vv" - "--ignore=src/rpy2/ipython/tests/test_rmagic.py"))))))) + (add-after 'unpack 'chdir + (lambda _ (chdir "rpy2-robjects")))) + #:test-flags + ;; TODO: remove this deselection when the pandas conversion test is + ;; fixed upstream (StringDtype vs dtype('O') assertion). + #~(list (string-append "--deselect=src/rpy2/robjects/tests/robjects/" + "test_pandas_conversions.py" + "::TestPandasConversions::test_ri2pandas")))) (propagated-inputs (list python-jinja2 - python-packaging python-rpy2-rinterface ;;python-backports-zoneinfo; needed for python_version<3.9 python-tzlocal)) - (native-inputs (list python-coverage - python-ipython + (native-inputs (list python-ipython-minimal python-numpy - python-packaging python-pandas python-pytest - python-pytest-cov - python-setuptools - python-wheel)) - (home-page #f) + python-setuptools)) + (home-page "https://rpy2.github.io/") (synopsis "Python interface to the R language (embedded R)") (description "Python interface to the R language (embedded R).") - (license #f))) + (license license:gpl2))) (define-public python-rpy2-patched - ;; TODO: Delete this after python-rpy2 is fixed upstream. + ;; TODO: Delete this after genenetwork2 can use python-rpy2 upstream; + ;; kept so deployments pinned to an older guix, whose python-rpy2 + ;; cannot be built, still get a working rpy2. (package (inherit python-rpy2) (name "python-rpy2") - (version "3.6.2") + (version "3.6.7") (source (origin (method url-fetch) (uri (pypi-uri "rpy2" version)) (sha256 - (base32 "1l3paflfc2wczjms9ghaklg4bxg0c2cqh4anvlskpl4id9vsakhp")))) + (base32 "17wczrbabp41bww11ivwrqvyn9ysgk4xx21h2csyj53xrr4ldyzi")))) (propagated-inputs (modify-inputs (package-propagated-inputs python-rpy2) (prepend r-minimal) |
