Skip to content

Commit

Permalink
Simplify installation of reticulate
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
khaeru committed Jan 20, 2025
1 parent 1e260eb commit 96407b5
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 96407b5

Please sign in to comment.