Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update SystemRequirements to match CRAN requirements #329

Merged
merged 4 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# rextendr (development version)

* `use_extendr()` sets the `DESCRIPTION`'s `SystemRequirements` field according to CRAN policy to `Cargo (Rust's package manager), rustc` (#329)
* Introduces new functions `use_cran_defaults()` and `vendor_pkgs()` to ease the publication of extendr-powered packages on CRAN. See the new article _CRAN compliant extendr packages_ on how to use these (#320).
* `rust_sitrep()` now better communicates the status of the Rust toolchain and available targets. It also guides the user through necessary installation steps to fix Rust setup (#318).
* `use_extendr()` and `document()` now set the `SystemRequirements` field of the `DESCRIPTION` file to
Expand Down
2 changes: 1 addition & 1 deletion R/setup.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ update_rextendr_version <- function(desc_path, cur_version = NULL) {
}

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

if (is.na(prev)) {
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/use_cran_defaults.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/_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
Loading