[R-pkg-devel] Fwd: src/install.libs.R
murdoch.duncan at gmail.com
Fri Oct 16 19:42:39 CEST 2015
I can't really read your code (HTML?), but there are several CRAN
packages which make use of this, for example tth, rJava, etc. I just
tried installing tth and it ran the script. So you might want to see
how your package differs from that one.
On 16/10/2015 1:18 PM, Facundo Muñoz wrote:
> I relaunch this question for which I had no answers.
> Just in case someone who can give some insight missed it before.
> Thanks in advance
> -------- Mensaje reenviado --------
> Asunto: src/install.libs.R
> Fecha: Tue, 6 Oct 2015 11:41:23 +0200
> De: Facundo Muñoz <famuvie at gmail.com>
> Para: r-package-devel at r-project.org
> Dear all,
> I need to make use of the |src/install.libs.R| file, in order to perform
> certain tasks at installation time.
> I followed the R-exts doc
> However, R CMD INSTALL seems to never run the script.
> Here is a minimal reproducible example.
> It makes use of |devtools| to simplify the example, but I have tried the
> installation manually as well.
> |## Create a minimal buildable package library(devtools)
> create('testpkg') ## Write src/install.libs.R dir.create('testpkg/src')
> test.file <- path.expand('~/testfile.txt') diag.lines <- c(
> deparse(quote(stop('This should break the installation'))),
> deparse(quote(file.create(test.file))) ) writeLines(diag.lines,
> 'testpkg/src/install.libs.R') ## Install package ## also tried manually
> with R CMD INSTALL install('testpkg') ## The installation did not break
> ## nor the file has been created file.exists('~/testfile.txt') # FALSE
> ## Cleanup remove.packages('testpkg') unlink('testpkg', recursive = TRUE) |
> Am I missing something?
> thanks in advance
> PS: by the way…
> |> sessionInfo() R version 3.2.2 (2015-08-14) Platform:
> x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 14.04.2 LTS locale:
>  LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
> LC_COLLATE=en_US.UTF-8  LC_MONETARY=fr_FR.UTF-8
> LC_MESSAGES=en_US.UTF-8 LC_PAPER=fr_FR.UTF-8 LC_NAME=C  LC_ADDRESS=C
> LC_TELEPHONE=C LC_MEASUREMENT=fr_FR.UTF-8 LC_IDENTIFICATION=C attached
> base packages:  stats graphics grDevices utils datasets methods base
> other attached packages:  devtools_126.96.36.19900 loaded via a namespace
> (and not attached):  tools_3.2.2 memoise_0.2.1 digest_0.6.8 |
> [[alternative HTML version deleted]]
> R-package-devel at r-project.org mailing list
More information about the R-package-devel