Hi Spencer,
You just need an available.packages matrix which reflects the reality you
want to test against. There are probably various ways of getting one of
these, but switchr allows you to build repositories off of many things
including local directories, so you could do something like
> setwd('/Users/gabrielbecker/gabe/checkedout/rtables/')
> library(switchr)
> chooseCRANmirror(ind = 1L)
> crancontribs = contrib.url(options()$repos)
> man = PkgManifest(name = "switchr", url = "~/gabe/checkedout/switchr",
type = "local")
> loccontrib <- lazyRepo(man)
> avl = available.packages(c(loccontrib, crancontribs))
> head(avl[, c("Package", "Version", "Repository")])
PackageVersion
switchr "switchr" "0.14.3"
A3 "A3" "1.0.0"
aaSEA"aaSEA""1.1.0"
AATtools "AATtools" "0.0.1"
ABACUS "ABACUS" "1.0.0"
abbyyR "abbyyR" "0.5.5"
Repository
switchr
"file:///var/folders/14/z0rjkn8j0n5dj1lkdd4ng160gn/T/Rtmpe1zsSL/repo/src/contrib"
A3 "https://cloud.r-project.org/src/contrib";
aaSEA"https://cloud.r-project.org/src/contrib";
AATtools "https://cloud.r-project.org/src/contrib";
ABACUS "https://cloud.r-project.org/src/contrib";
abbyyR "https://cloud.r-project.org/src/contrib";
And pass avl directly to package_dependencies
> tools::package_dependencies("switchr", db = avl)
$switchr
[1] "methods" "tools" "RJSONIO" "RCurl"
The benefit here beyond just constructing the PACKAGES file for your one
package (which if you want to get clever is all available.packages is
actually going to need) is that switchr will allow you to install it if you
want as well. switchr also allows you to install from your local working
copies of multiple inter-related packages simultaneously by having a
manifest that has those working copies in it, if you are doing development
that crosses package boundaries.
This reminds me that I need to polish and push some utilities related to
local checkouts of packages, I'll try to do that soon.
Anyway, hope that helps as it is now,
Best,
~G
On Fri, Oct 16, 2020 at 3:28 PM Spencer Graves
wrote:
> Hello, All:
>
>
> tools::package_dependencies('Ecfun') failed to find how my
> development version of Ecfun was using rJava, which generated errors in
> "R CMD build Ecfun". This is because package_dependencies by default
> uses CRAN and ignores locally installed packages.
>
>
> What do you think about having this function check both locally
> installed and CRAN versions?
>
>
> It can probably be done, but I don't see how at the moment.
>
>
> Also, the traditional interpretation of a help file with Usage
> including an argument 'which = c("Depends", "Imports", "LinkingTo")' is
> that specifying nothing defaults to "Depends". In this case, it
> defaults to "Imports". Moreover, I don't see a way to trace "Suggests".
>
>
> ???
> Thanks,
> Spencer Graves
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
[[alternative HTML version deleted]]
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel