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

Re: Packaging Hybrid R/Python Software



Hi Ben,

thanks for contacting the pkg-r team.

On Tue, Nov 17, 2020 at 04:20:59AM +0000, Morledge-Hampton, Benjamin Stuart wrote:
> Hello,
> 
> I have a couple of questions about packaging some software for debian that is dependent on both custom R and Python packages.
> 
> First, what is the proper way to package such a project?  The python portion of the project is highly dependent on the R package I have created, but the R package stands on its own fairly well.  Would it make sense to package the R project on its own and then package the python code, listing the R package as a dependency for installation?  Alternatively, would it make more sense to just package everything together since it really does run best that way?  If I were to package both together, how would this look using debhelper?  Would a debian/rules file with the following two lines be acceptable?
> 
> dh $@ --with python3 --buildsystem=pybuild
> dh $@ --with R --buildsystem=R

I admit I have not much inside into the project you have in mind.
However, there is r-cran-fastcluster[1] you might want to have a look
at.  I would not say thet there is a "right or wrong" solution - finally
all install files need to end up in the proper location on users machine
via a set of *.deb packages.  But the solution in fastcluster looks
pretty sensible and easily readable to me.
 
> Second, the R package I am planning on distributing has some dependencies that are not available in the default apt repositories (lomb, msiseq, and deconstructsigs).  Do I need to package these for debian as well in order to deploy my project?

Yes, definitely (see below how to approach this).

> Is that something I can do without explicit permission from the original R package creators?

In Debian slang the authors of the R code are called "upstream authors".
It is considered polite to inform them about the attempt to package but
given it is free software you do not need to ask for permission and
given the amount of R packages it would be quite some work to always
contact upstream in advance.  Thus I do not do this and I guess most
Debian packagers do the same except if there are reasons to talk to
upstream (to apply patches, ask for help etc.)

> Alternatively, since I am testing all this in a ppa at the moment, can I upload the packages there without stepping on any toes?

You can only upload Debian packages to ftp.debian.org when you have
Debian Developer status.  However, you are perfectly able to do the
maintenance work and ask a Debian Developer here (at least five are
reading this list) for sponsering your work.

To do so please register at

     https://salsa.debian.org

and ask for becoming a member of r-pkg-team.  This will give you
permissions to push to our team scope on salsa.debian.org.  The
preparation of R packages is very simple.  Just install the dh-r
package (at best from unstable/sid) and do

    prepare_missing_cran_package lomb
    prepare_missing_cran_package ...

This will create close to ready packaging repositories in

    ../CRAN_prospective

from the said package as well as all its not yet packaged dependencies.
Please verivy the "FIXME" inside debian/copyright and also make sure the
description in debian/control makes sense.  Once you have created such
repositories there is some helper script

    https://salsa.debian.org/med-team/community/helper-scripts/-/blob/master/inject-into-salsa-git

Just call this script when you are in such a repository and it will push
your initial repository to salsa.d.o.  If you are happy with your
packaging you can call itp_from_debian_dir[2] (I've just uploaded
dh-r_20201117 where this script is also installed to /usr/bin since it
is so established meanwhile.  Once this is done you can ask for
sponsering your package here on the list.
 
> I greatly appreciate any help you are able to give.

Hope this helps so far.  Feel free to keep on asking here on this list
if something might remain unclear.

Kind regards

     Andreas.


[1] https://salsa.debian.org/r-pkg-team/r-cran-fastcluster
[2] https://salsa.debian.org/r-pkg-team/dh-r/-/blob/master/scripts/itp_from_debian_dir

-- 
http://fam-tille.de


Reply to: