r-lib / pkgbuild

Find tools needed to build R packages
https://pkgbuild.r-lib.org
Other
66 stars 35 forks source link

pkgbuild can now avoid copying large package trees #150

Closed gaborcsardi closed 1 year ago

gaborcsardi commented 1 year ago

This is currently an opt-in feature, and you need to set the PKG_BUILD_COPY_METHOD=link environment variable ot turn it on. It can also be configured via an option or a DESCRIPTION entry. See ?build or README.md.

Closes #59.

krlmlr commented 1 year ago

Thanks. I wonder why this has proven to be that complicated.

In some cases like duckdb, arrow, r-igraph, we might need the parent directory to be present during R CMD build . . Looks like this is incompatible with the new option.

I'll try the next time I have a package directory with a lot of detritus.

gaborcsardi commented 1 year ago

In some cases like duckdb, arrow, r-igraph, we might need the parent directory to be present during R CMD build . . Looks like this is incompatible with the new option.

I am not sure how this is possible. pkgbuild::build() just runs R CMD build, which also starts by copying and trimming the package directory. pkgbuild does the same, except that it does not copy stuff that would be deleted immediately, anyway. So if it works with R CMD build, it should work with pkgbuild::build(). (FWIW it works fine for igraph, I just tried.)