From 49641009eca010447e733678018415376081973a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Mon, 17 May 2021 13:58:02 +0200 Subject: [PATCH 1/3] Use the scm fallback mechanism to set pyarrow's version in the python source distribution --- python/setup.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/python/setup.py b/python/setup.py index fac8e0b32e3..80b6d70dd08 100755 --- a/python/setup.py +++ b/python/setup.py @@ -525,12 +525,8 @@ def _move_shared_libs_unix(build_prefix, build_lib, lib_name): default_version = '5.0.0-SNAPSHOT' if (not os.path.exists('../.git') and not os.environ.get('SETUPTOOLS_SCM_PRETEND_VERSION')): - if os.path.exists('PKG-INFO'): - # We're probably in a Python sdist, setuptools_scm will handle fine - pass - else: - os.environ['SETUPTOOLS_SCM_PRETEND_VERSION'] = \ - default_version.replace('-SNAPSHOT', 'a0') + os.environ['SETUPTOOLS_SCM_PRETEND_VERSION'] = \ + default_version.replace('-SNAPSHOT', 'a0') # See https://github.com/pypa/setuptools_scm#configuration-parameters From dab0cdd284d9bd48025ae59cbae09caa956198de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Mon, 17 May 2021 15:27:20 +0200 Subject: [PATCH 2/3] Remove git before testing sdist --- ci/scripts/python_sdist_test.sh | 8 +++++++- docker-compose.yml | 7 ++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ci/scripts/python_sdist_test.sh b/ci/scripts/python_sdist_test.sh index 1388ca09e43..016723d03cb 100755 --- a/ci/scripts/python_sdist_test.sh +++ b/ci/scripts/python_sdist_test.sh @@ -42,10 +42,16 @@ export PYARROW_WITH_DATASET=${ARROW_DATASET:-OFF} # unset ARROW_HOME # apt purge -y pkg-config +# ARROW-12619 +if [ command -v COMMAND &> /dev/null ]; then + echo "Git exists, remove it from PATH before executing this script." + exit 1 +fi + if [ -n "${PYARROW_VERSION:-}" ]; then sdist="${arrow_dir}/python/dist/pyarrow-${PYARROW_VERSION}.tar.gz" else - sdist=$(ls "${arrow_dir}/python/dist/pyarrow-*.tar.gz" | sort -r | head -n1) + sdist=$(ls ${arrow_dir}/python/dist/pyarrow-*.tar.gz | sort -r | head -n1) fi ${PYTHON:-python} -m pip install ${sdist} diff --git a/docker-compose.yml b/docker-compose.yml index 53500b5f2cc..215aa2c6b7a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -713,6 +713,7 @@ services: volumes: *ubuntu-volumes command: > /bin/bash -c " + apt remove -y git && /arrow/ci/scripts/cpp_build.sh /arrow /build && /arrow/ci/scripts/python_sdist_test.sh /arrow" @@ -814,9 +815,9 @@ services: source: . target: "C:/arrow" command: arrow\\ci\\scripts\\python_wheel_windows_test.bat - + java-bundled-jars: - # Docker image + # Docker image image: ${REPO}:${ARCH}-java-bundled-jars-vcpkg-${VCPKG} build: args: @@ -831,7 +832,7 @@ services: volumes: - .:/arrow:delegated - ${DOCKER_VOLUME_PREFIX}python-wheel-manylinux2014-ccache:/ccache:delegated - command: + command: [/arrow/ci/scripts/java_bundled_jars_manylinux_build.sh /arrow /build /arrow/dist] ############################## Integration ################################# From c423b9620f5b8dd33c9a1f2dc9fa527d42d34587 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Mon, 17 May 2021 15:30:01 +0200 Subject: [PATCH 3/3] Fix bash condition --- ci/scripts/python_sdist_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/scripts/python_sdist_test.sh b/ci/scripts/python_sdist_test.sh index 016723d03cb..3dd7d7ddd5b 100755 --- a/ci/scripts/python_sdist_test.sh +++ b/ci/scripts/python_sdist_test.sh @@ -43,7 +43,7 @@ export PYARROW_WITH_DATASET=${ARROW_DATASET:-OFF} # apt purge -y pkg-config # ARROW-12619 -if [ command -v COMMAND &> /dev/null ]; then +if command -v git &> /dev/null; then echo "Git exists, remove it from PATH before executing this script." exit 1 fi