Skip to content

Commit 4e9b65a

Browse files
h-vetinarikouxhochy
authored
apacheGH-14993: [CI][Conda] Fix missing RECIPE_ROOT variable now expected by conda build (apache#15014)
Fixes apache#14993 * Closes: apache#14993 Lead-authored-by: H. Vetinari <[email protected]> Co-authored-by: Sutou Kouhei <[email protected]> Co-authored-by: Uwe L. Korn <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
1 parent 23a7a15 commit 4e9b65a

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

dev/tasks/conda-recipes/build_steps.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,32 @@
1010
# benefit from the improvement.
1111

1212
set -xeuo pipefail
13+
export FEEDSTOCK_ROOT="${FEEDSTOCK_ROOT:-/home/conda/feedstock_root}"
1314

1415
output_dir=${1}
1516

1617
export PYTHONUNBUFFERED=1
17-
export FEEDSTOCK_ROOT="${FEEDSTOCK_ROOT:-/home/conda/feedstock_root}"
18+
export RECIPE_ROOT="${RECIPE_ROOT:-/home/conda/recipe_root}"
1819
export CI_SUPPORT="${FEEDSTOCK_ROOT}/.ci_support"
1920
export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml"
2021

2122
cat >~/.condarc <<CONDARC
2223
2324
conda-build:
24-
root-dir: ${output_dir}
25+
root-dir: ${output_dir}
2526
2627
CONDARC
2728

2829
mamba install --update-specs --yes --quiet "conda-forge-ci-setup=3" conda-build pip boa -c conda-forge
2930
mamba update --update-specs --yes --quiet "conda-forge-ci-setup=3" conda-build pip boa -c conda-forge
3031

3132
# set up the condarc
32-
setup_conda_rc "${FEEDSTOCK_ROOT}" "${FEEDSTOCK_ROOT}" "${CONFIG_FILE}"
33+
setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}"
3334

3435
source run_conda_forge_build_setup
3536

3637
# make the build number clobber
37-
make_build_number "${FEEDSTOCK_ROOT}" "${FEEDSTOCK_ROOT}" "${CONFIG_FILE}"
38+
make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}"
3839

3940
if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]] && [[ "${HOST_PLATFORM}" != linux-* ]] && [[ "${BUILD_WITH_CONDA_DEBUG:-0}" != 1 ]]; then
4041
EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test"

dev/tasks/conda-recipes/r-arrow/build.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ export DISABLE_AUTOBREW=1
55

66
# arrow uses C++17
77
export ARROW_R_CXXFLAGS="${ARROW_R_CXXFLAGS} -std=c++17"
8+
export LIBARROW_BUILD=false
89

910
if [[ "${target_platform}" == osx-* ]]; then
1011
# See https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk
1112
export ARROW_R_CXXFLAGS="${ARROW_R_CXXFLAGS} -D_LIBCPP_DISABLE_AVAILABILITY"
1213
fi
1314

14-
export PKG_CONFIG_PATH="${PREFIX}/lib/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}"
15-
1615
# ${R_ARGS} necessary to support cross-compilation
1716
${R} CMD INSTALL --build r/. ${R_ARGS}

dev/tasks/conda-recipes/run_docker_build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ build_dir=${1}
1616
THISDIR="$( cd "$( dirname "$0" )" >/dev/null && pwd )"
1717
ARROW_ROOT=$(cd "$THISDIR/../../.."; pwd;)
1818
FEEDSTOCK_ROOT=$THISDIR
19+
RECIPE_ROOT=$THISDIR
1920

2021
docker info
2122

@@ -64,6 +65,7 @@ docker run ${DOCKER_RUN_ARGS} \
6465
-v "${ARROW_ROOT}":/arrow:rw,z \
6566
-v "${build_dir}":/build:rw \
6667
-e FEEDSTOCK_ROOT="/arrow/dev/tasks/conda-recipes" \
68+
-e RECIPE_ROOT="/arrow/dev/tasks/conda-recipes" \
6769
-e CONFIG \
6870
-e R_CONFIG \
6971
-e HOST_USER_ID \

r/configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ else
104104
PKGCONFIG_DIRS=`pkg-config --libs-only-L --silence-errors ${PKG_CONFIG_NAME}`
105105
fi
106106

107-
if [ "$PKGCONFIG_CFLAGS" ] && [ "$PKGCONFIG_LIBS" ]; then
107+
if [ "$PKGCONFIG_LIBS" != "" ]; then
108108
FOUND_LIB_DIR=`echo $PKGCONFIG_DIRS | sed -e 's/^-L//'`
109109
echo "*** Arrow C++ libraries found via pkg-config at $FOUND_LIB_DIR"
110110
PKG_CFLAGS="$PKGCONFIG_CFLAGS $PKG_CFLAGS"

0 commit comments

Comments
 (0)