reproduce-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[task #15772] R packages in Maneage


From: Mohammad Akhlaghi
Subject: [task #15772] R packages in Maneage
Date: Fri, 11 Sep 2020 14:30:16 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0

Update of task #15772 (project reproduce):

                 Summary:      R-project / R-base => R packages in Maneage  

    _______________________________________________________

Follow-up Comment #1:

When you added the 'R CMD INSTALL ...' command, did it download all the
dependencies as binary from the internet? The "make line" is a little
ambiguous, did you add a full new Make rule (with a separate target for this
package), or just added in the same rule that R is built.

I have never needed R, but I know a lot of people/projects use it. So have
always been looking for someone who needs it (and is thus motivated!), to help
in adding R packages in Maneage similar to Python. Many projects use R and if
we have the infra-structure to add R packages easily (like in Python or
X.org), it would be great. 

Following the Python/X.org model, we can define a
'reproduce/software/make/r.mk' Makefile file which will be only in charge of
building R and its packages. I also have a similar model in mind for TeXLive
packages in the development branch (with a 'reproduce/software/make/tex.mk').
We can then "include" these language-specific packages into 'high-level.mk'
the same way that we add Python and X.org's packages.

Having a look at the ggplot2 page you sent
<https://cran.r-project.org/web/packages/ggplot2/index.html>, it seems the
dependencies are under the "Imports" title (in this case "digest, glue,
grDevices, grid, gtable, isoband, MASS, mgcv, rlang, scales, stats, tibble,
withr"). The page also has the link to the "package source" tarball. So
effectively it has all the components we need!

If you can find the relevant command to disable internet connection when
building from the tarball, here is an "easy" way to climb down the dependency
tree! This is what we did in the first days of adding Python packages: 

You simply add the rule to install your high-level package, 'ggplot2' in this
case, but without any internet. Once it doesn't find its dependencies, it's
build should fail, saying that you need to have XXXX (if it lists many
depenendencies, just take the first one). 

You then add another Make rule for XXXX, and set it as a prerequisite of
'ggplot2'. In the build of XXXX, it will probably complain about not having
YYYY (as a dependency of XXXX), so you add a rule for YYYY and set it as a
dependency for XXXX. You follow this loop until the first package
(lowest-level package!) successfully builds! 

Make will then automatically come up the dependency tree you have already
setup, and will complain on the first package that needs another dependency (a
different branch in the dependency tree!). So again you continue and soon
you'll have all the low-level infrastructure built :-).

Like Python (and any high-level language), the core dependencies should be the
same for most packages, so once we build them for one package, it is much more
easier to do it for other packages.

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/task/?15772>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]