[Rd] [R] R CMD Build feature searches or requests

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Dec 7 15:40:44 CET 2007


This is clearly an R-devel topic, so I've moved it there.
Please re-read the descriptions of the lists in the posting guide.

On Thu, 6 Dec 2007,Johannes Graumann wrote:

> Hello,
>
> I'm missing two features in "R CMD build":
> 1) Easy building of Windows/zip packaged package version alongside the
> *nix-style *.tar.gz.
> Right now I'm doing a scripted version of
>        R CMD build <PACKAGE>
>        R CMD INSTALL <PACKAGE>
>        mkdir tmp
>        cp -r /usr/local/lib/R/site-library/<PACKAGE> tmp/<PACKAGE>
>        cd tmp
>        zip -r <PACKAGE>_<EXTRACTEDVERSION>.zip <PACKAGE>
>        mv *.zip ..
>        cd ..
>        rm -rf tmp
> I was wondering whether it wouldn't be helpfull to others maintaining
> packages not requiring genuine cross-compilation (only containing R code)
> to deal with this via an option to "R CMD build". Something
> like '-zip-package' might do it ...

But you needed to install first, which 'build' does not do by default. 
This seems a rare need that you can script for yourself.

> 2) My scripted solution right now also automatically increments version
> numbers and adjusts dates in <PACKAGE>/man/<PACKAGE>-package.Rd and
> <PACKAGE>/DESCRIPTION, ensuring progressing and continuous package naming.
> Would be nice to have an "R CMD build"-option to take care of that too ...

R CMD build adds a date when the packaging was done, but that need not be 
the date of the package.  For my packages the date is that of the last 
change, but the final packaging for distribution can be much later, at a 
time related to R release dates.  In particular, the version of the 
DESCRIPTION file in the svn archive is the master, not that distributed.

Incrementing version numbers automatically is nigh impossible: some people 
omit -0 for example, so what is the next version after 1.7?  1.8? 1.8-1? 
1.8.1?

> Please let me know what you think or where to find the functionality in case
> I overlooked it.

If you find that enough people support your wish for 1 (and so far I have 
seen no response at all), you could contribute a patch for review and 
possible inclusion in a future version of R.  But not, please, to R-help.


-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-devel mailing list