[R-pkg-devel] Advice concerning a wrapper package

Duncan Murdoch murdoch@dunc@n @end|ng |rom gm@||@com
Wed Aug 10 11:02:52 CEST 2022


On 09/08/2022 5:35 p.m., RICHET Yann wrote:
> Thank you for your answer.
> 
> All sources (.cpp, .h and .R files) are in the libKriging directory, so as you suggested inside inst/libKriging
> But as the whole size before compiling is exceeding 15MB, I would add some cleanup to delete inst/libKriging sources after compiling.
> Is it a bad solution ?

The normal layout would put .cpp and .h files in src, and .R files in R. 
  The src directory can have subdirectories, e.g. src/libKriging.  Those 
won't get compiled automatically, but your makefiles can compile them.

Duncan Murdoch

> 
> Regards
> 
> Yann
> 
> 
> ________________________________________
> From: Duncan Murdoch [murdoch.duncan using gmail.com]
> Sent: Tuesday, August 09, 2022 6:18 PM
> To: RICHET Yann; r-package-devel using r-project.org
> Subject: Re: [R-pkg-devel] Advice concerning a wrapper package
> 
> On 09/08/2022 10:38 a.m., RICHET Yann wrote:
>> Dear all,
>>
>> This is a slightly exotic situation: I need to publish on CRAN an R package, which do not hold any source code itself, just makefiles and scripts.
>> The whole source code belongs to another project (C++, python, R, ...) and for now I put it in another directory at same level that R, inst, ...
>> Indeed, this directory is a git submodule of the wrapped project in C++, so my R package has just some scripts for pre-compile stuff, moving some dirs, ...
>>
>> Of course, it returns some CRAN WARNING and NOTE due to that:
>> ...
>> * checking top-level files ... NOTE
>> Non-standard file/directory found at top level:
>>     'libKriging'
> 
> This should be fixed by putting that directory under "inst".  Then it
> will be installed to the top level.
> 
>> ...
>> * checking package subdirectories ... WARNING
>> Subdirectory 'src' contains no source files.
>> ...
>> * checking use of PKG_*FLAGS in Makefiles ... NOTE
>>      PKG_CPPFLAGS set in 'src/Makevars' without any corresponding files
>>      PKG_CXXFLAGS set in 'src/Makevars.win' without any corresponding files
>>      PKG_CPPFLAGS set in 'src/Makevars.win' without any corresponding files
>> * checking use of SHLIB_OPENMP_*FLAGS in Makefiles ... NOTE
>>     src/Makevars.win: SHLIB_OPENMP_CXXFLAGS is included in PKG_CXXFLAGS without any C++ files
>>     src/Makevars.win: SHLIB_OPENMP_CXXFLAGS is included in PKG_LIBS but linking is by C
>> ...
>>
>>
>> My questions:
>>
>> * any ideas to fix these warnings ?
>> * what will be really blocking for CRAN submisison ? (I mean which NOTE should be 'tolerated' ?)
>> * do you already know such exotic container-package that could hold some good ideas ?
> 
> If your package is accepted by CRAN and a user chooses to install it,
> where will they get the source files from?
> 
> Duncan Murdoch



More information about the R-package-devel mailing list