[Rd] tools::package_dependencies problems
g@bembecker @end|ng |rom gm@||@com
Sat Oct 17 01:07:45 CEST 2020
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
> 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")])
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"
And pass avl directly to package_dependencies
> tools::package_dependencies("switchr", db = avl)
 "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,
On Fri, Oct 16, 2020 at 3:28 PM Spencer Graves <spencer.graves using prodsyse.com>
> 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".
> Spencer Graves
> R-devel using r-project.org mailing list
[[alternative HTML version deleted]]
More information about the R-devel