Re: [Rcpp-devel] lighter source package

2016-02-29 Thread Baptiste Auguie
On 1 March 2016 at 04:21, Dirk Eddelbuettel  wrote:

>
> On 29 February 2016 at 09:48, Simon Urbanek wrote:
> |
> |
> | > On Feb 28, 2016, at 2:59 PM, Kevin Ushey  wrote:
> | >
> | > What about having a 'configure' script that generates this header file
> | > on package install?
> | >
> https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Configure-and-cleanup
> | >
> |
> | You don't even need that - it's much easier to simply add a rule to
> Makevars along the lines of:
> |
> | foo.h: foo.bz2.h
> |   ${R_BZIPCMD} -d foo.bz2.h
>
> I think you want foo.h.bz2 in both places.
>
> Dirk
>
> Thanks both, I like the simplicity of it. And sorry the link is now dead
since I removed the file from the repo (
https://github.com/baptiste/planar/blob/8c2000c39307d991f1ed237b02f09472fd5e268f/src/clencurt.h).
Running bzip2 -z clencurt.h brings it down from 40Mb to 14Mb, which is an
improvement.
I'm sure I'll use this tip in the future, thanks!

baptiste



> |
> | assuming that compression is enough (the referred file doesn't exist in
> the sources ...)
> |
> | Cheers,
> | Simon
> |
> |
> |
> | > On Sun, Feb 28, 2016 at 11:18 AM, Baptiste Auguie
> | >  wrote:
> | >> Dear Rcpp gurus,
> | >>
> | >> In the process of updating my planar package
> | >> , CRAN has mentioned their
> concern with
> | >> the size of the source package (20Mb compressed tar.gz). This puzzled
> me
> | >> until I found the culprit: a 40Mb header file
> | >>  with
> 500k
> | >> pre-calculated quadrature points.
> | >> I'm thinking that the easiest strategy is probably to compress these
> data
> | >> into binary form, say as a Rdata file in inst/, and have the Makefile
> do
> | >> some magic to recover it during the package compilation. I'm not sure
> how to
> | >> achieve this, or if it even makes sense. Any example of a similar
> procedure
> | >> I could follow?
> | >>
> | >> Thanks,
> | >>
> | >> baptiste
> | >>
> | >> ___
> | >> Rcpp-devel mailing list
> | >> Rcpp-devel@lists.r-forge.r-project.org
> | >>
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
> | > ___
> | > Rcpp-devel mailing list
> | > Rcpp-devel@lists.r-forge.r-project.org
> | >
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
> | >
> |
> | ___
> | Rcpp-devel mailing list
> | Rcpp-devel@lists.r-forge.r-project.org
> | https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
>
> --
> http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
> ___
> Rcpp-devel mailing list
> Rcpp-devel@lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
>
___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Re: [Rcpp-devel] lighter source package

2016-02-29 Thread Dirk Eddelbuettel

On 29 February 2016 at 09:48, Simon Urbanek wrote:
| 
| 
| > On Feb 28, 2016, at 2:59 PM, Kevin Ushey  wrote:
| > 
| > What about having a 'configure' script that generates this header file
| > on package install?
| > 
https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Configure-and-cleanup
| > 
| 
| You don't even need that - it's much easier to simply add a rule to Makevars 
along the lines of:
| 
| foo.h: foo.bz2.h
|   ${R_BZIPCMD} -d foo.bz2.h

I think you want foo.h.bz2 in both places.

Dirk

| 
| assuming that compression is enough (the referred file doesn't exist in the 
sources ...)
| 
| Cheers,
| Simon
| 
| 
| 
| > On Sun, Feb 28, 2016 at 11:18 AM, Baptiste Auguie
| >  wrote:
| >> Dear Rcpp gurus,
| >> 
| >> In the process of updating my planar package
| >> , CRAN has mentioned their concern with
| >> the size of the source package (20Mb compressed tar.gz). This puzzled me
| >> until I found the culprit: a 40Mb header file
| >>  with 500k
| >> pre-calculated quadrature points.
| >> I'm thinking that the easiest strategy is probably to compress these data
| >> into binary form, say as a Rdata file in inst/, and have the Makefile do
| >> some magic to recover it during the package compilation. I'm not sure how 
to
| >> achieve this, or if it even makes sense. Any example of a similar procedure
| >> I could follow?
| >> 
| >> Thanks,
| >> 
| >> baptiste
| >> 
| >> ___
| >> Rcpp-devel mailing list
| >> Rcpp-devel@lists.r-forge.r-project.org
| >> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
| > ___
| > Rcpp-devel mailing list
| > Rcpp-devel@lists.r-forge.r-project.org
| > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
| > 
| 
| ___
| Rcpp-devel mailing list
| Rcpp-devel@lists.r-forge.r-project.org
| https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel


Re: [Rcpp-devel] lighter source package

2016-02-29 Thread Simon Urbanek


> On Feb 28, 2016, at 2:59 PM, Kevin Ushey  wrote:
> 
> What about having a 'configure' script that generates this header file
> on package install?
> https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Configure-and-cleanup
> 

You don't even need that - it's much easier to simply add a rule to Makevars 
along the lines of:

foo.h: foo.bz2.h
${R_BZIPCMD} -d foo.bz2.h

assuming that compression is enough (the referred file doesn't exist in the 
sources ...)

Cheers,
Simon



> On Sun, Feb 28, 2016 at 11:18 AM, Baptiste Auguie
>  wrote:
>> Dear Rcpp gurus,
>> 
>> In the process of updating my planar package
>> , CRAN has mentioned their concern with
>> the size of the source package (20Mb compressed tar.gz). This puzzled me
>> until I found the culprit: a 40Mb header file
>>  with 500k
>> pre-calculated quadrature points.
>> I'm thinking that the easiest strategy is probably to compress these data
>> into binary form, say as a Rdata file in inst/, and have the Makefile do
>> some magic to recover it during the package compilation. I'm not sure how to
>> achieve this, or if it even makes sense. Any example of a similar procedure
>> I could follow?
>> 
>> Thanks,
>> 
>> baptiste
>> 
>> ___
>> Rcpp-devel mailing list
>> Rcpp-devel@lists.r-forge.r-project.org
>> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
> ___
> Rcpp-devel mailing list
> Rcpp-devel@lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
> 

___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel