From 96407b5056eabb3cb533886c2ab399cc22f42641 Mon Sep 17 00:00:00 2001 From: Paul Natsuo Kishimoto Date: Mon, 20 Jan 2025 12:08:18 +0100 Subject: [PATCH] Simplify installation of reticulate - Drop use of "remotes"; call install.packages() directly. - Install libpng-dev for compiling R 'png' package from source on Linux. - Drop workaround for actions/runner-images#11137; appears no longer necessary. --- .github/workflows/pytest.yaml | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 553c49c08..0fff3445d 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -94,29 +94,13 @@ jobs: # [docs] requires [tests] which requires [report,tutorial] run: uv pip install .[docs] - - name: Install R dependencies and tutorial requirements - # Workaround for https://github.com/actions/runner-images/issues/11137 - if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' }} - run: | - install.packages(c("remotes", "Rcpp")) - remotes::install_cran( - c("IRkernel", "reticulate"), - dependencies = TRUE, - # force = TRUE, - ) - - reticulate::py_config() - shell: Rscript {0} + - name: "Install libpng-dev" # for R 'png', required by reticulate + if: startsWith(matrix.os, 'ubuntu-') + run: sudo apt install libpng-dev - name: Install R dependencies and tutorial requirements - if: ${{ ! (matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12') }} run: | - install.packages(c("remotes", "Rcpp")) - remotes::install_cran( - c("IRkernel", "reticulate"), - dependencies = TRUE, - # force = TRUE, - ) + install.packages(c("IRkernel", "reticulate")) # commented: for debugging # print(reticulate::py_config())