Skip to content

Commit

Permalink
ARROW-7832: [R] Patches to 0.16.0 release
Browse files Browse the repository at this point in the history
Closes #6404 from nealrichardson/r-0.16.0.1 and squashes the following commits:

a4fbc20 <Neal Richardson> Fix indentation
46b15eb <Neal Richardson> Changes for CRAN 0.16.0.1

Authored-by: Neal Richardson <neal.p.richardson@gmail.com>
Signed-off-by: Neal Richardson <neal.p.richardson@gmail.com>
  • Loading branch information
nealrichardson committed Feb 11, 2020
1 parent 8f2c39e commit e2177ac
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 27 deletions.
24 changes: 11 additions & 13 deletions r/README.md
Expand Up @@ -88,19 +88,17 @@ tab$x
#> 10
#> ]
as.data.frame(tab)
#> # A tibble: 10 x 3
#> x y z
#> <int> <dbl> <fct>
#> 1 1 -0.546 b
#> 2 2 0.537 c
#> 3 3 0.420 b
#> 4 4 -0.584 c
#> 5 5 0.847 b
#> 6 6 0.266 c
#> 7 7 0.445 b
#> 8 8 -0.466 c
#> 9 9 -0.848 b
#> 10 10 0.00231 c
#> x y z
#> 1 1 -0.545880758 b
#> 2 2 0.536585304 c
#> 3 3 0.419623149 b
#> 4 4 -0.583627199 c
#> 5 5 0.847460017 b
#> 6 6 0.266021979 c
#> 7 7 0.444585270 b
#> 8 8 -0.466495124 c
#> 9 9 -0.848370044 b
#> 10 10 0.002311942 c
```

## Installing a development version
Expand Down
3 changes: 2 additions & 1 deletion r/configure
Expand Up @@ -94,7 +94,8 @@ else
PKG_CFLAGS="-I$BREWDIR/opt/$PKG_BREW_NAME/include"
PKG_LIBS="-L$BREWDIR/opt/$PKG_BREW_NAME/lib $PKG_LIBS"
elif [ "$UNAME" = "Linux" ]; then
VERSION=$(grep ^Version DESCRIPTION | sed s/Version:\ //)
VERSION=`grep ^Version DESCRIPTION | sed s/Version:\ //`
: ${LIBARROW_BINARY_DISTRO:="$NOT_CRAN"}
${R_HOME}/bin/Rscript tools/linuxlibs.R $VERSION
PKG_CFLAGS="-I$(pwd)/libarrow/arrow-${VERSION}/include $PKG_CFLAGS"
PKG_LIBS="-L$(pwd)/libarrow/arrow-${VERSION}/lib $PKG_LIBS"
Expand Down
24 changes: 11 additions & 13 deletions r/tools/linuxlibs.R
Expand Up @@ -66,22 +66,20 @@ download_binary <- function(os = identify_os()) {
libfile
}

# Function to figure out which flavor of binary we should download.
# By default, it will try to discover from the OS what distro-version we're on
# Function to figure out which flavor of binary we should download, if at all.
# By default ("FALSE"), it will not download a precompiled library,
# but you can override this by setting the env var LIBARROW_BINARY_DISTRO to:
# * `FALSE` (not case-sensitive), which tells the script not to download a binary,
# * `TRUE` (not case-sensitive), to try to discover your current OS, or
# * some other string, presumably a related "distro-version" that has binaries
# built that work for your OS
identify_os <- function(os = Sys.getenv("LIBARROW_BINARY_DISTRO")) {
if (nzchar(os)) {
if (identical(tolower(os), "false")) {
# Env var says not to download a binary
return(NULL)
} else {
# Env var provided an os-version to use--maybe you're on Ubuntu 18.10 but
# we only build for 18.04 and that's fine--so use what the user set
return(os)
}
identify_os <- function(os = Sys.getenv("LIBARROW_BINARY_DISTRO", "false")) {
if (identical(tolower(os), "false")) {
# Env var says not to download a binary
return(NULL)
} else if (!identical(tolower(os), "true")) {
# Env var provided an os-version to use--maybe you're on Ubuntu 18.10 but
# we only build for 18.04 and that's fine--so use what the user set
return(os)
}

if (nzchar(Sys.which("lsb_release"))) {
Expand Down

0 comments on commit e2177ac

Please sign in to comment.