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

Re: Packaging Hybrid R/Python Software



Hi Ben,

On 17 November 2020 at 04:20, Morledge-Hampton, Benjamin Stuart wrote:
| I have a couple of questions about packaging some software for debian that is dependent on both custom R and Python packages.

Can you clarify what you mean by "packaging"? Creating a .deb (or set of
.deb) for lab or company use (easy, common), or upload to Debian's repos
(more formal requirements).
 
| 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.

That suggests a one-way dependency, no?

| 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

What you could also do is to have these two lines under two different targets
creating both an R package and a Python package and have the latter depend on
the former.
 
| 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?  Is that something I can do without explicit permission from the original R package creators?  Alternatively, since I am testing all this in a ppa at the moment, can I upload the packages there without stepping on any toes?

That is related to question 1 above. Where do you plan to distribute this
from?

But in a nutshell, if something is a dependency then yes it needs to be
packaged too. That isn't really this hard.  Some of us have worked on various
'cran2deb' iniatives for many (many) years; one very successful and active
initiative is Michael's PPAs for Ubuntu (currentlu ~ 4600 packages for three
distros).  Because CRAN is so rigorous and structured, it really generally is
just a matter of running a simple script. And by keeping these outside of
Debian you save a little on formalism and development time, but you of course
reach fewer people. I sometimes still build local packages (accessible via
apt from Launchpad, or GitHub pages, ...) for CI use etc but I also maintain
a few dozen r-cran-* packages in the distro.

Hope this helps,  Dirk

-- 
https://dirk.eddelbuettel.com | @eddelbuettel | edd@debian.org


Reply to: