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.
Duncan Murdoch 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 > ƒacu.- > > > > -------- Mensaje reenviado -------- > Asunto: src/install.libs.R > Fecha: Tue, 6 Oct 2015 11:41:23 +0200 > De: Facundo Muñoz <famu...@gmail.com> > Para: r-package-devel@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]] > > ______________________________________________ > R-package-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-package-devel > ______________________________________________ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel