Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARROW-6258: [R] Add macOS build scripts #5095

Closed
wants to merge 5 commits into from

Conversation

nealrichardson
Copy link
Member

When installing the R package from source on macOS, if the configure script cannot find libarrow with pkgconfig, and if apache-arrow has not been installed via Homebrew (neither of which is the case on CRAN), an "autobrew" step happens: a script is downloaded and sourced, which uses a fork of Homebrew to download and install binary dependencies for bundling with the R package.

This patch alters the configure script to let you FORCE_AUTOBREW, which is useful for testing, and it will use a local autobrew script file, if found, rather than downloading it. The patch also adds the autobrew script and the apache-arrow.rb brew formula to the r/tools directory, alongside the similar script that downloads the Arrow C++ binary on Windows. The two scripts are copied exactly from their "upstream" versions (noted on L18 of each file), with two minor modifications: (1) autobrew will use a local apache-arrow.rb formula if the file exists, and (2) the formula adds the head reference so you can brew install --build-from-source --HEAD apache-arrow.rb and pull the latest master branch of apache/arrow from GitHub.

See this in action at https://github.com/nealrichardson/arrow-r-nightly/blob/34d27bf482fa1d9f490003a8396fabdff5beea37/.travis.yml. Ordinarily I would add a Travis-CI job to apache/arrow for this, but I know we're anxious not to delay build times further, so I'll run this job nightly. Nightly runs will solve https://issues.apache.org/jira/browse/ARROW-5134, and it will also allow us to host an R package repository with nightly binaries for macOS (and Windows too, using the existing Appveyor config + deploy to bintray).

To install a binary from that repository on macOS, install.packages("arrow", repos="https://dl.bintray.com/nealrichardson/arrow-r").

One TODO: get @jeroen 's approval to include these scripts here under the Apache license and add a citation to LICENSE.txt.

@jeroen
Copy link
Contributor

jeroen commented Aug 15, 2019

You have my approval to use these scripts.

@wesm
Copy link
Member

wesm commented Aug 15, 2019

Would you mind adding a license file to https://github.com/jeroen/autobrew in case this comes up again in the future?

@nealrichardson
Copy link
Member Author

LICENSE note added. This should be ready to go.

@codecov-io
Copy link

Codecov Report

Merging #5095 into master will decrease coverage by 12.38%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #5095       +/-   ##
===========================================
- Coverage   87.64%   75.25%   -12.39%     
===========================================
  Files        1014       57      -957     
  Lines      145922     3617   -142305     
  Branches     1437        0     -1437     
===========================================
- Hits       127887     2722   -125165     
+ Misses      17673      895    -16778     
+ Partials      362        0      -362
Impacted Files Coverage Δ
python/pyarrow/ipc.pxi
cpp/src/arrow/csv/chunker-test.cc
cpp/src/parquet/column_page.h
cpp/src/parquet/bloom_filter-test.cc
cpp/src/arrow/array/builder_decimal.cc
cpp/src/plasma/client.cc
cpp/src/arrow/io/test-common.h
cpp/src/arrow/util/int-util-test.cc
rust/parquet/src/arrow/converter.rs
cpp/src/arrow/python/io.cc
... and 947 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2ba0566...499296d. Read the comment docs.

@nealrichardson nealrichardson deleted the force-autobrew branch August 19, 2019 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants