rstudio / packrat

Packrat is a dependency management system for R
http://rstudio.github.io/packrat/
401 stars 89 forks source link

local323 external packages rtools #535

Open adamrobinson361 opened 5 years ago

adamrobinson361 commented 5 years ago

@kevinushey - I raised a few issues a while back about packrat not having a great story with compilation on windows.

This was around a number of packages such as XML, stringi, regal and others that had system dependencies that were required to build.

I've been looking into this and found that when you have the external goodies listed on CRAN here set up they build no problem.

The setup procedure was to download local323.zip, extract somewhere and edit makeconf files to point to folder. e.g the following where c:/extsoft is where I extracted the zip.

LOCAL_SOFT = c:/extsoft LIB_XML = c:/extsoft

Note this is less manual than what is said in say the XML windows readme.

The only packages I've not got this to work for yet are Rcurl and curl which from the link look to have something their own system dependencies that I'll need to set up. Edit: downloading spatial zip in r goodies folder and extracting to same location builds these too.

Is there any way you can think of working this process into packrat or do you even think that's the best place to do so? I've tried with the majority of problem packages I'd previously identified and this seems to solve the compilation problem on windows for me.

adamrobinson361 commented 5 years ago

@kevinushey - would you be up for including the renv::equip() function in packrat? I understand renv is going to be a replacement but I think this function would solve a lot of problems widows users have in the mean time.

At present I've got a very similar function in our corporate R package here on a feature branch that I'm thinking would be best not merge into master if 1. it could be a default in packrat or 2. renv is just round the corner.

If you think this is a good idea I can provide a pull request if you don't have time?

kevinushey commented 5 years ago

I'd be open to it, but renv is indeed right around the corner and we're hoping that most users of Packrat will be able to transition to using renv.

I think for Packrat the more verbose naming style would be preferred; e.g. installExtsoft() or something similar.