diff --git a/ci/docker/linux-apt-r.dockerfile b/ci/docker/linux-apt-r.dockerfile index 894f53bc0a3..f2c9575d6ec 100644 --- a/ci/docker/linux-apt-r.dockerfile +++ b/ci/docker/linux-apt-r.dockerfile @@ -84,6 +84,10 @@ RUN cat /arrow/ci/etc/rprofile >> $(R RHOME)/etc/Rprofile.site # Also ensure parallel compilation of C/C++ code RUN echo "MAKEFLAGS=-j$(R -s -e 'cat(parallel::detectCores())')" >> $(R RHOME)/etc/Renviron.site +# Set up Python 3 and its dependencies +RUN ln -s /usr/bin/python3 /usr/local/bin/python && \ + ln -s /usr/bin/pip3 /usr/local/bin/pip + COPY ci/scripts/r_deps.sh /arrow/ci/scripts/ COPY r/DESCRIPTION /arrow/r/ RUN /arrow/ci/scripts/r_deps.sh /arrow @@ -93,10 +97,6 @@ RUN /arrow/ci/scripts/install_minio.sh ${arch} linux latest /usr/local COPY ci/scripts/install_gcs_testbench.sh /arrow/ci/scripts/ RUN /arrow/ci/scripts/install_gcs_testbench.sh ${arch} default -# Set up Python 3 and its dependencies -RUN ln -s /usr/bin/python3 /usr/local/bin/python && \ - ln -s /usr/bin/pip3 /usr/local/bin/pip - COPY python/requirements-build.txt /arrow/python/ RUN pip install -r arrow/python/requirements-build.txt diff --git a/ci/docker/linux-r.dockerfile b/ci/docker/linux-r.dockerfile index ca701e259c4..1cbde3207ed 100644 --- a/ci/docker/linux-r.dockerfile +++ b/ci/docker/linux-r.dockerfile @@ -46,6 +46,10 @@ COPY ci/scripts/install_minio.sh /arrow/ci/scripts/ COPY ci/scripts/install_gcs_testbench.sh /arrow/ci/scripts/ RUN /arrow/ci/scripts/r_docker_configure.sh +# Set up Python 3 and its dependencies +RUN ln -s /usr/bin/python3 /usr/local/bin/python && \ + ln -s /usr/bin/pip3 /usr/local/bin/pip + COPY ci/scripts/r_deps.sh /arrow/ci/scripts/ COPY r/DESCRIPTION /arrow/r/ RUN /arrow/ci/scripts/r_deps.sh /arrow diff --git a/ci/scripts/r_deps.sh b/ci/scripts/r_deps.sh index 79977fca16d..0fa4368cd8a 100755 --- a/ci/scripts/r_deps.sh +++ b/ci/scripts/r_deps.sh @@ -41,6 +41,15 @@ fi # but we want to error/fail the build. # options(warn=2) turns warnings into errors ${R_BIN} -e "options(warn=2); install.packages('remotes'); remotes::install_cran(c('glue', 'rcmdcheck', 'sys')); remotes::install_deps(INSTALL_opts = '"${INSTALL_ARGS}"')" + +# (Temporarily) install DuckDB from source to avoid their Unity builds +# (though only if we haven't filtered it out of the deps above, +# and if we can't get a binary from RSPM) +# Remove when there is a DuckDB release > 0.3.1-1 +if grep -q "duckdb" DESCRIPTION; then + ${R_BIN} -e "if (all(!grepl('packagemanager.rstudio', options('repos')))) { remotes::install_github('duckdb/duckdb', subdir = '/tools/rpkg', build = FALSE) }" +fi + # Separately install the optional/test dependencies but don't error on them, # they're not available everywhere and that's ok ${R_BIN} -e "remotes::install_deps(dependencies = TRUE, INSTALL_opts = '"${INSTALL_ARGS}"')" diff --git a/r/tests/testthat/test-duckdb.R b/r/tests/testthat/test-duckdb.R index 1b3012bcef8..b31fffda95a 100644 --- a/r/tests/testthat/test-duckdb.R +++ b/r/tests/testthat/test-duckdb.R @@ -66,6 +66,7 @@ test_that("to_duckdb", { }) test_that("to_duckdb then to_arrow", { + skip("Flaky, unskip when ARROW-14745 is merged") ds <- InMemoryDataset$create(example_data) ds_rt <- ds %>%