Open michaelmayer2 opened 12 months ago
Thanks! Unfortunately, this approach is not going to work, for a number of reasons. pak does not use the PPM API any more, to be able to match system requirements to individual R packages. Instead it matches SystemRequirements
fields manually to the database at https://github.com/rstudio/r-system-requirements.
We could easily do the same for Bioc packages, but we would need another DB that lists the SystemRequirements
fields of Bioc packages, as this is not part of the repository metadata.
Thanks for your feedback - does this mean the code https://github.com/r-lib/pak/blob/main/R/system-requirements.R#L72-L93 that still uses the RSPM API is no longer in use ?
Right. The sysreqs.R and sysreqs2.R files are used in the pkgdepends package.
With https://github.com/r-lib/pkgcache/pull/96 and https://github.com/r-lib/pkgcache/pull/97 (devel) pak now supports system requirements for Bioconductor packages:
> pak::pkg_sysreqs(c("r-lib/xml2", "CHRONOS"))
── Install scripts ──────────────────────────────────────────────────────────────── Ubuntu 22.04 ──
apt-get -y update
apt-get -y install libcurl4-openssl-dev libssl-dev libglpk-dev libgmp3-dev libxml2-dev \
libpng-dev make default-jdk libicu-dev pandoc
R CMD javareconf
R CMD javareconf
── Packages and their system dependencies ─────────────────────────────────────────────────────────
CHRONOS – default-jdk, pandoc
curl – libcurl4-openssl-dev, libssl-dev
igraph – libglpk-dev, libgmp3-dev, libxml2-dev
openssl – libssl-dev
png – libpng-dev
RCurl – libcurl4-openssl-dev, make
rJava – default-jdk, make
stringi – libicu-dev
XML – libxml2-dev
xml2 – libxml2-dev
I hope this will solve your use cases.
This is an early version of a PR that will enhance
pak::pkg_system_requirements()
so that it will check allR
andBioconductor
type repositories on a given packagemanager (only URL of packagemanager needs to be specified) and extract system dependencies of a given set of packages.Previously,
pak::pkg_system_requirements()
only worked for a single repository and the list of packages had to be split before making a function call.In addition, the PR also automatically detects if a repository is of type
Bioconductor
and then appendsbioc_version=x.y
to the API call.Example:
Without the PR
pak
will reportwhich is expected as
flowcatchR
is a Bioconductor package and as such not in the (default) CRAN repo.Note:
BiocManager
.