Closed paleolimbot closed 1 year ago
I don't think pkgdepends or pkgbuild do that. OTOH the first thing R CMD build
does is copying the package directory.
Sorry for the indirection...I shouldn't have tried to squeeze that in to the end of a work week. I edited the issue and can take a stab at a solution next week 🙂
Yeah, I would prefer running an R file with Rscript
, that is more portable, and works if there is no sh
on Windows. Even if Rtools is installed, sh
might not be on the PATH
.
No rush, but I took a stab at this in https://github.com/r-lib/pkgbuild/pull/157 !
In trying to remove some hacks from the nanoarrow package, which lives in a subdirectory of the https://github/apache/arrow-nanoarrow , I discovered that during the packaging phase the subdirectory is separated from the context before any script in the R package is run (e.g.,
cleanup
). This means that the vendoring stage (where I copy the nanoarrow sources into the R package) doesn't work out-of-the box with all the pak-based tooling (e.g., GitHub actions in CI).@jeroen suggested
.prepare
, as used by r-universe: https://github.com/r-universe-org/build-source/blob/master/entrypoint.sh#L38 , or perhaps an R script ("prepare.R"? "bootstrap.R"? Something defined in the DESCRIPTION?)See https://github.com/apache/arrow-nanoarrow/pull/98 for context...the example I'm working with is:
I can't quite locate where in https://github.com/r-lib/pkgdepends/blob/main/R/install-plan.R this could be changed but can take a look next week.