Skip to content

build time dependency

8 messages · Uwe Ligges, Romain Francois, Seth Falcon

#
Hello,

Is there such thing as a build time dependency between packages : 
package B needs package A so that it can build, but once built it lives 
without it.

For example depending on the ant package to compile java code, or depend 
on roxygen to roxygenize the code, ...

Adding roxygen to Depends works, but then the installed package does not 
depend on it and therefore loads it for nothing. Maybe I can remove 
roxygen from the Depends as part of the ./configure[.win] ...

Romain
2 days later
#
Romain Francois wrote:
Do you mean at a) "R CMD build" time or at b) "R CMD INSTALL" time?
For a), you probably do not need to declare it in DESCRIPTION at all 
(untested).
For b), you need to declare it. I feel uncomfortable to change the 
Depends field between source and binary version of a package. At least, 
it is not documented to work and if it works (have you tested that?), it 
might not work in some future release of R.
But since you gave at least 2 reasonable examples for a 
INSTALL-time-only dependency, you might want to contribute some patches 
to handle such a thing.

Best wishes,
Uwe
#
On 09/27/2009 08:27 PM, Uwe Ligges wrote:
I meant R CMD INSTALL (but probably also R CMD build --binary), I need 
to check the code to see where this overlaps.
Sure. I'll have a look to add a "InstallDependencies" (or whatever other 
spelling) field along the lines of Depends, but for INSTALL time.

Romain

  
    
#
Romain Francois wrote:
Are you sure you *really* need those dependencies at INSTALL rather than 
build time? I haven't looked closely into roxygen so far, but if it is 
designed to work at INSTALL time, the task is to move this to the build 
time of the package from my point of view.

Since the roxygen author, Manuel Eugster, is in Dortmund today, I will 
discuss this point.

Best,
Uwe Ligges
#
On 09/28/2009 04:39 PM, Uwe Ligges wrote:
Hi Uwe,

I think you are supposed to do this kind of sequence:

R CMD roxygen yourRoxygenablePackage
R CMD build yourRoxygenablePackage_roxygen

... but I don't like this because what you upload to cran is not the 
actual source but somethingalready pre-processed. (This also applies to 
packages shipping java code, most people just compile the java code on 
their machine and only supply a jar of compiled code, but that's another 
story I suppose ...)

I'd prefer the roxygenation to be part of the standard build/INSTALL 
system, so my plan is to write configure and configure.win which would 
call roxygenize to generate Rd.

I am not aware of any hook similar to configure[.win] you can use so 
that "R CMD build" does something extra. I probably just missed it.

Romain

  
    
#
On Mon, Sep 28, 2009 at 11:25 AM, Romain Francois
<romain.francois at dbmail.com> wrote:
I can appreciate the desire to make the "true" sources available.  At
the same time, I think one should very carefully consider the expense
of external dependencies on a package.

One could view doc generation along the same lines as configure script
generation -- a compilation step that can be done once instead of by
all those who install and as a result reduce the depencency burden of
those wanting to install the package.  Configure scripts are almost
universally included pre-built in distribution source packages so that
users do not need to have the right version of autoconf/automake.

In other words, are you sure you want to require folks to install
roxygen (or whatever) in order to install your package? Making it easy
to do so is great, but in general if you can find a way to reduce
dependencies and have your package work, that is better. :-)

+ seth
#
On 09/29/2009 04:36 AM, Seth Falcon wrote:
The kind of configure[.win] scripts I am using are very simplistic and 
do not come from autoconf, etc ...

something like this to compile the java source code using the ant package :

#!/bin/bash
cd inst/java_src
"${R_HOME}/bin/Rscript" -e "ant::ant()"
That is exactly what I am trying to do here, those who build the package 
are not necessarily the same as those who install it, so installation 
would not depend on roxygen. And Uwe is very right that what I am 
looking for is indeed __build__ time rather than __install__ time.

  
    
#
Romain Francois wrote:
I think you should talk to Manuel whose intention really was the usage 
you mentioned above (i.e. before or at build time).

Best,
Uwe