Skip to content

Commit

Permalink
Merge pull request #666 from r-lib/sysreqs-platforms
Browse files Browse the repository at this point in the history
List known platforms in `pkg_sysreqs()` documentation
  • Loading branch information
gaborcsardi committed Aug 8, 2024
2 parents 059590b + 324941d commit ef75db2
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 10 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,5 @@ Config/Needs/deploy:
processx
Config/testthat/edition: 3
Encoding: UTF-8
RoxygenNote: 7.2.3.9000
RoxygenNote: 7.3.2
Biarch: true
19 changes: 15 additions & 4 deletions R/sysreqs.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,16 @@ sysreqs_fix_installed <- function(packages = NULL,
#' Calculate system requirements of one of more packages
#'
#' @inheritParams pkg_install
#' @param sysreqs_platform System requirements platform. If `NULL`, then the
#' `sysreqs_platform` \eval{man_config_link("configuration option")}
#' is used, which defaults to the current platform. Set this option if
#' \eval{.packageName} does not detect your platform correctly.
#' @param sysreqs_platform System requirements platform.
#'
#' If `NULL`, then the `sysreqs_platform`
#' \eval{man_config_link("configuration option")} is used, which defaults to
#' the current platform.
#'
#' Set this option if to one of \eval{platforms()} if \eval{.packageName}
#' fails to correctly detect your platform or if you want to see the system
#' requirements for a different platform.
#'
#' @return List with entries:
#' * `os`: character string. Operating system.
#' * `distribution`: character string. Linux distribution, `NA` if the
Expand Down Expand Up @@ -197,3 +203,8 @@ print.pak_sysreqs <- function(x, ...) {
class(x) <- setdiff(class(x), "pak_sysreqs")
NextMethod("[")
}


platforms <- function() {
paste0('\\code{"', sort(sysreqs_platforms()$distribution), '"}', collapse = ", ")
}
15 changes: 10 additions & 5 deletions man/pkg_sysreqs.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ef75db2

Please sign in to comment.