[Rd] Including a binary Python Interpreter into a binary R-package for MS Windows

gvsteen at yahoo.com gvsteen at yahoo.com
Wed Sep 2 01:09:01 CEST 2009


Hi Gabor, 

Thank you very much! That is an excelent idea! 

I had not thought about Jython at all. Moreover, I always had the impression that the latest Jython distribution was based on Python 2.2. But I just saw that they upgraded to 2.5 a few months ago. This is quite fortunate because both "dataframes2xls" and "write2xls" depend on Python 2.4 or better. 

An R user will not notice much of a 15 MB download. And for most MS Windows users Java is an even more common thing than Perl. 

I will definitely check this out! 

Thanks a lot!!! 

Best wishes, 

Guido 

--- On Wed, 9/2/09, Gabor Grothendieck <ggrothendieck at gmail.com> wrote:

> From: Gabor Grothendieck <ggrothendieck at gmail.com>
> Subject: Re: [Rd] Including a binary Python Interpreter into a binary  R-package for MS Windows
> To: gvsteen at yahoo.com
> Cc: Uwe.Ligges at r-project.org, r-devel at r-project.org
> Date: Wednesday, September 2, 2009, 12:06 AM
> On Tue, Sep 1, 2009 at 5:41 PM,
> <gvsteen at yahoo.com>
> wrote:
> > 2009/8/30 Uwe Ligges <ligges at statistik.tu-dortmund.de>:
> > [snip]
> >> Guido van Steen wrote:
> > [snip]
> >>> Something that interests me too: What about
> R's policy with respect to
> >>> including binary files? I saw that developers
> should include a file
> > [snip]
> >> Please do not include binary files and carefully
> watch for licenses of those
> >> files (e.g. if GPL'ed, you need to ship sources!).
> If pyhthon is required, I
> >> highly suggest to state it in the
> SystemDependencies and be fine with it -
> >> users can learn to install phython themselves, I'm
> pretty sure.
> >
> > Hi Uwe,
> >
> > Note: I will send this email cc. to the R-devel list,
> which I joined today. I think it may be of interest to other
> people as well.
> >
> > Thank you for your answer, although it disappointed me
> a bit. I had already spent quite some time building a
> stand-alone windows binary of a new package "write2xls".
> This package provides the same R interface to Python as the
> other package "dataframes2xls". As you know it enable users
> to create xls files. The special thing about "write2xls" is
> that it does not have any dependencies at all. It is
> so-to-speak a turn-key solution.
> >
> > Of course I should have read a bit more before I
> started. Only after your mail I read the pdf-file "Writing R
> Extensions". It says "A source package if possible should
> not contain binary executable files: they are not portable,
> and a security risk if they are of the appropriate
> architecture. R CMD check will warn about them unless they
> are listed (one filepath per line) in a file 'BinaryFiles'
> at the top level of the package or bundle. Note that CRAN
> will no longer accept submissions containing binary files
> even if they are listed."
> >
> > So, yes, you are right. I was actually hoping that
> CRAN could make some exceptions, but after some thinking I
> fully understand that many people would object to this for
> good reasons: R code depending on a C compiler will not work
> without a C Compiler either. For security reasons we cannot
> allow packages to install a binary C compiler. So, yes, I
> understand the reasons but still it is a pity.
> >
> > The current situation is that many MS Windows users
> can not easily use "dataframes2xls". There are a few
> reasons:
> >
> > * Most users of MS Windows will be unfamiliar with
> Python, which will make them reluctant to install Python.
> >
> > * Installing Python will be impossible on many MS
> Windows platforms due to limited user rights.
> >
> > * Downloading a standard Python installer takes about
> 15 Megabytes. My newly created "write2xls" package just
> contains 1.3 MB.
> >
> 
> Note that the rSymPy package has an entire Jython
> interpreter
> in it and provided your software is only R and pure python
> you
> should be able to run it off that.
> 
> Of course this just trades one dependency for another, i.e.
> it
> does not require python since that's included but it does
> require
> java; however, most people have java installed already
> since a lot
> of the free software out there requires java.  See:
> http://rsympy.googlecode.com
> 
> Note that since java jar files are source files and since
> java itself
> is not included it was possible to do that without any
> binaries.
> 






More information about the R-devel mailing list