Skip to content

Commit

Permalink
fix: use the CRAN suggesting SystemRequirements field
Browse files Browse the repository at this point in the history
  • Loading branch information
eitsupi committed Aug 15, 2023
1 parent 82a7be8 commit ac09737
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/setup.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ update_rextendr_version <- function(path, cur_version = NULL) {
}

update_sys_reqs <- function(path) {
cur <- "Cargo (rustc package manager)"
cur <- "Cargo (Rust's package manager), rustc"
prev <- stringi::stri_trim_both(desc::desc_get("SystemRequirements", path)[[1]])

if (is.na(prev)) {
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/use_extendr.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Message
i First time using rextendr. Upgrading automatically...
i Setting `Config/rextendr/version` to "0.3.1.9000" in the 'DESCRIPTION' file.
i Setting `SystemRequirements` to "Cargo (rustc package manager)" in the 'DESCRIPTION' file.
i Setting `SystemRequirements` to "Cargo (Rust's package manager), rustc" in the 'DESCRIPTION' file.
v Creating 'src/rust/src'.
v Writing 'src/entrypoint.c'
v Writing 'src/Makevars'
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-use_extendr.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ test_that("use_extendr() sets up extendr files correctly", {
version_in_desc <- stringi::stri_trim_both(desc::desc_get("Config/rextendr/version", path)[[1]])
sysreq_in_desc <- stringi::stri_trim_both(desc::desc_get("SystemRequirements", path)[[1]])
expect_equal(version_in_desc, as.character(packageVersion("rextendr")))
expect_equal(sysreq_in_desc, "Cargo (rustc package manager)")
expect_equal(sysreq_in_desc, "Cargo (Rust's package manager), rustc")

# directory structure
expect_true(dir.exists("src"))
Expand Down

0 comments on commit ac09737

Please sign in to comment.