[R-pkg-devel] Fwd: src/install.libs.R

Facundo Muñoz famuvie at gmail.com
Fri Oct 16 19:18:58 CEST 2015


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
        ƒacu.-



-------- 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
<http://cran.univ-paris1.fr/doc/manuals/r-release/R-exts.html#Package-subdirectories>.
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
ƒacu.-

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:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=fr_FR.UTF-8
LC_MESSAGES=en_US.UTF-8 LC_PAPER=fr_FR.UTF-8 LC_NAME=C [9] LC_ADDRESS=C
LC_TELEPHONE=C LC_MEASUREMENT=fr_FR.UTF-8 LC_IDENTIFICATION=C attached
base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages: [1] devtools_1.8.0.9000 loaded via a namespace
(and not attached): [1] tools_3.2.2 memoise_0.2.1 digest_0.6.8 |

​



	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list