[Rd] how to list external dependencies (i.e., non-R packages)?

Jeroen Ooms jeroen.ooms at stat.ucla.edu
Wed Jul 16 08:25:00 CEST 2014


On Sun, Jul 13, 2014 at 12:13 PM, Greg Minshall <minshall at acm.org> wrote:
>
> is there a way of specifying this dependency in, say, the DESCRIPTION
> file?  (seems unlikely, as this is what the whole autotools/configure.ac
> framework is supposed to deal with.)

As was mentioned, the SystemRequirements field allows for this, but
the format is quite informal and hence package managers cannot
automatically resolve such dependencies. A few years ago [1] it was
suggested on this mailing lists to extend the DESCRIPTION spec with
fields that allow package authors to specify which particular deb or
rpm packages are required to build the R package. However this was
shot down with the argument that it is not the responsibility of the
package author to determine the required build/runtime dependencies on
the OS of the user.

Debian/Ubuntu users can take advantage of the "debianized" packages
from cran2deb [2,3,4] which, among other benefits, do have the
capability to formally declare external dependencies. Such r-cran-xx
and r-bioc-xx packages will automatically install build/runtime
dependencies when needed  (e.g. libmagickwand-dev). Due to the
limitations above, this system currently relies on 3rd party
volunteers (with limited resources) to maintain a database [5] of
"Depends" and "Build-Depends" for all R packages. Dirk Eddelbuettel,
Michael Rutter and Don Armstrong are doing a great job to keep this
system going and provide binary builds of many cran/bioc packages for
the various deb distributions. Creating a debianized version of your
own R package is quite easy too, and solves the problem at least for
your debian/ubuntu users :-)

I still think it would be useful to introduce a standard field/format
somewhere in the R package metadata that gives package authors the
option to suggest deb/rpm/homebrew dependencies required to build/use
the R package. But for now the best we can do is provide manual
instructions in the SystemRequirements+readme.

Jeroen


[1] https://stat.ethz.ch/pipermail/r-devel/2011-February/059787.html
[2] http://dirk.eddelbuettel.com/papers/useR2009cran2deb.pdf
[3] http://www.personal.psu.edu/mar36/blogs/the_ubuntu_r_blog/cran2deb4ubuntu.html
[4] http://debian-r.debian.net/
[5] http://debian-r.debian.net/debian-r/c2d/



More information about the R-devel mailing list