diff --git a/ci/scripts/python_sdist_test.sh b/ci/scripts/python_sdist_test.sh index 1388ca09e43..3dd7d7ddd5b 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 git &> /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 ################################# 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