Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
A new version of RcppAPT – our interface from R to the C++ library behind the awesome apt
, apt-get
, apt-cache
, … commands and their cache powering Debian, Ubuntu and the like – is now on CRAN.
This version is a bit of experiment. I had asked on the r-package-devel and r-devel list how I could suppress builds on macOS. As it does not have the required libapt-pkg-dev
library to support the apt
, builds always failed. CRAN managed to not try on Solaris or Fedora, but somewhat macOS would fail. Each. And. Every. Time. Sadly, nobody proposed a working solution.
So I got tired of this. Now we detect where we build, and if we can infer that it is not a Debian or Ubuntu (or derived system) and no libapt-pkg-dev
is found, we no longer fail. Rather, we just set a #define
and at compile-time switch to essentially empty code. Et voilà: no more build errors.
And as before, if you want to use the package to query the system packaging information, build it on system using apt
and with its libapt-pkg-dev
installed.
A few other cleanups were made too.
Changes in version 0.0.5 (2017-09-29)
NAMESPACE
now sets symbol registration
configure
checks for suitable system, no longer errors if none found, but sets good/baddefine
for the buildExisting C++ code is now conditional on having a ‘good’ build system, or else alternate code is used (which succeeds everywhere)
Added
suitable()
returning a boolean with configure resultTests are conditional on
suitable()
to test good buildsThe Travis setup was updated
The vignette was updated and expanded
Courtesy of CRANberries, there is also a diffstat report for this release.
A bit more information about the package is available here as well as as the GitHub repo.
This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.