Skip to content

Commit

Permalink
set CRAN_FLAGS only when vendored packages are used
Browse files Browse the repository at this point in the history
  • Loading branch information
JosiahParry committed Nov 17, 2024
1 parent 479b30f commit d2db22e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion inst/templates/configure
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"${R_HOME}/bin/Rscript" tools/msrv.R

# Set CRAN_FLAGS based on the NOT_CRAN value
if [ "${NOT_CRAN}" != "true" ]; then
if [ "${NOT_CRAN}" != "true" ] && [ -f ./src/rust/vendor.tar.xz ]; then
export CRAN_FLAGS="-j 2 --offline"
else
export CRAN_FLAGS=""
Expand Down
4 changes: 2 additions & 2 deletions inst/templates/configure.win
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" tools/msrv.R

# Set CRAN_FLAGS based on the NOT_CRAN value
if [ "${NOT_CRAN}" != "true" ]; then
if [ "${NOT_CRAN}" != "true" ] && [ -f ./src/rust/vendor.tar.xz ]; then
export CRAN_FLAGS="-j 2 --offline"
else
export CRAN_FLAGS=""
fi

# delete Makevars if it is present
# delete Makevars.win if it is present
[ -f src/Makevars.win ] && rm src/Makevars.win

# Substitute @CRAN_FLAGS@ in Makevars.in with the actual value of $CRAN_FLAGS
Expand Down
6 changes: 3 additions & 3 deletions tests/testthat/_snaps/use_extendr.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"${R_HOME}/bin/Rscript" tools/msrv.R
# Set CRAN_FLAGS based on the NOT_CRAN value
if [ "${NOT_CRAN}" != "true" ]; then
if [ "${NOT_CRAN}" != "true" ] && [ -f ./src/rust/vendor.tar.xz ]; then
export CRAN_FLAGS="-j 2 --offline"
else
export CRAN_FLAGS=""
Expand All @@ -48,13 +48,13 @@
"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" tools/msrv.R
# Set CRAN_FLAGS based on the NOT_CRAN value
if [ "${NOT_CRAN}" != "true" ]; then
if [ "${NOT_CRAN}" != "true" ] && [ -f ./src/rust/vendor.tar.xz ]; then
export CRAN_FLAGS="-j 2 --offline"
else
export CRAN_FLAGS=""
fi
# delete Makevars if it is present
# delete Makevars.win if it is present
[ -f src/Makevars.win ] && rm src/Makevars.win
# Substitute @CRAN_FLAGS@ in Makevars.in with the actual value of $CRAN_FLAGS
Expand Down

0 comments on commit d2db22e

Please sign in to comment.