[R-pkg-devel] Fwd: src/install.libs.R
murdoch.duncan at gmail.com
Fri Oct 16 21:32:01 CEST 2015
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.
We corresponded offline. The problem with the sample is that it has no
files in src that trigger processing: those would be Makefile,
Makefile.win, Makevars, or source files in supported languages.
If the real example doesn't have any of these (e.g. because it is just
copying a pre-compiled file from somewhere; not something you should do
in a CRAN package, but maybe reasonable in a local one), then the
easiest workaround is just to add an empty Makevars file.
> 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_22.214.171.12400 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