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

Re: Packaging Hybrid R/Python Software



From: Dirk Eddelbuettel <edd@debian.org>
Sent: Tuesday, November 17, 2020 7:39 AM
To: Morledge-Hampton, Benjamin Stuart <b.morledge-hampton@wsu.edu>
Cc: debian-r@lists.debian.org <debian-r@lists.debian.org>
Subject: 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).
My current plan is to have the package accessible through a ppa.  I believe that means that I build the source files locally and then launchpad builds the .deb for distribution from those source files?  (I'm still new to a lot of this, so my understanding of the whole process is shaky at best.)  I wouldn't be opposed to uploading the package to Debian's repos, but I want to try to get it working in a more informal environment first.  Does that seem reasonable?

| 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.
Great!  This is very helpful!  I will plan to create the R package as a dependency for the python package then. 

| 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.
Thank you.  This, in combination with Andreas's response give me a very good idea of how to proceed.

Hope this helps,  Dirk

--
It really does help!  Thanks so much!  One final question:  Am I quoting/replying to this email in an acceptable manner based on what is common practice in these mailing lists?  This is the first time I have done anything more complex than just hitting "reply" on an email, and I want to make sure I am doing it correctly.

Reply to: