Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try to remove workaround for setuptools bug
Browse files Browse the repository at this point in the history
pitrou committed Jan 6, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent bd07ce7 commit b3ce08c
Showing 7 changed files with 13 additions and 26 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -96,6 +96,7 @@ VCPKG="943c5ef1c8f6b5e6ced092b242c8299caae2ff01" # 2024.04.26 Release
# This is a workaround for our CI problem that "archery docker build" doesn't
# use pulled built images in dev/tasks/python-wheels/github.windows.yml.
PYTHON_WHEEL_WINDOWS_IMAGE_REVISION=2025-01-06
PYTHON_WHEEL_WINDOWS_TEST_IMAGE_REVISION=2025-01-06a

# Use conanio/${CONAN_BASE}:{CONAN_VERSION} for "docker compose run --rm conan".
# See https://github.com/conan-io/conan-docker-tools#readme and
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

# NOTE: You must update PYTHON_WHEEL_WINDOWS_IMAGE_REVISION in .env
# NOTE: You must update PYTHON_WHEEL_WINDOWS_TEST_IMAGE_REVISION in .env
# when you update this file.

# based on mcr.microsoft.com/windows/servercore:ltsc2019
@@ -41,10 +41,8 @@ RUN %PYTHON_CMD% -m pip install \
--pre \
--prefer-binary \
-r C:/arrow/python/requirements-wheel-test.txt
# 1. cffi-based tests would crash when importing cffi.
# 2. cython-based tests would crash when importing the compiled extension module
# (presumably because of https://github.com/pypa/setuptools/issues/4662)
RUN %PYTHON_CMD% -m pip uninstall -y cffi cython
# cffi-based tests would crash when importing cffi.
RUN %PYTHON_CMD% -m pip uninstall -y cffi

ENV PYTHON="3.13t"
ENV PYTHON_GIL=0
2 changes: 1 addition & 1 deletion ci/docker/python-wheel-windows-test-vs2019-base.dockerfile
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

# NOTE: You must update PYTHON_WHEEL_WINDOWS_IMAGE_REVISION in .env
# NOTE: You must update PYTHON_WHEEL_WINDOWS_TEST_IMAGE_REVISION in .env
# when you update this file.

# based on mcr.microsoft.com/windows/servercore:ltsc2019
2 changes: 1 addition & 1 deletion ci/docker/python-wheel-windows-test-vs2019.dockerfile
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

# NOTE: You must update PYTHON_WHEEL_WINDOWS_IMAGE_REVISION in .env
# NOTE: You must update PYTHON_WHEEL_WINDOWS_TEST_IMAGE_REVISION in .env
# when you update this file.

# based on mcr.microsoft.com/windows/servercore:ltsc2019
7 changes: 1 addition & 6 deletions ci/scripts/python_wheel_windows_test.bat
Original file line number Diff line number Diff line change
@@ -18,6 +18,7 @@
@echo on

set PYARROW_TEST_ACERO=ON
set PYARROW_TEST_CYTHON=ON
set PYARROW_TEST_DATASET=ON
set PYARROW_TEST_FLIGHT=ON
set PYARROW_TEST_GANDIVA=OFF
@@ -31,12 +32,6 @@ set PYARROW_TEST_SUBSTRAIT=ON
set PYARROW_TEST_S3=ON
set PYARROW_TEST_TENSORFLOW=ON

if "%PYTHON%"=="3.13t" (
set PYARROW_TEST_CYTHON=OFF
) else (
set PYARROW_TEST_CYTHON=ON
)

set ARROW_TEST_DATA=C:\arrow\testing\data
set PARQUET_TEST_DATA=C:\arrow\cpp\submodules\parquet-testing\data

10 changes: 5 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1318,28 +1318,28 @@ services:
command: arrow\\ci\\scripts\\python_wheel_windows_build.bat

python-wheel-windows-test-base:
image: ${REPO}:python-wheel-windows-test-vs2019-base-${PYTHON_WHEEL_WINDOWS_IMAGE_REVISION}
image: ${REPO}:python-wheel-windows-test-vs2019-base-${PYTHON_WHEEL_WINDOWS_TEST_IMAGE_REVISION}
build:
context: .
dockerfile: ci/docker/python-wheel-windows-test-vs2019-base.dockerfile
volumes: *python-wheel-windows-vs2019-volumes

python-wheel-windows-test:
image: ${REPO}:python-${PYTHON}-wheel-windows-test-vs2019-${PYTHON_WHEEL_WINDOWS_IMAGE_REVISION}
image: ${REPO}:python-${PYTHON}-wheel-windows-test-vs2019-${PYTHON_WHEEL_WINDOWS_TEST_IMAGE_REVISION}
build:
args:
base: ${REPO}:python-wheel-windows-test-vs2019-base-${PYTHON_WHEEL_WINDOWS_IMAGE_REVISION}
base: ${REPO}:python-wheel-windows-test-vs2019-base-${PYTHON_WHEEL_WINDOWS_TEST_IMAGE_REVISION}
python: ${PYTHON}
context: .
dockerfile: ci/docker/python-wheel-windows-test-vs2019.dockerfile
volumes: *python-wheel-windows-vs2019-volumes
command: arrow\\ci\\scripts\\python_wheel_windows_test.bat

python-free-threaded-wheel-windows-test:
image: ${REPO}:python-3.13-free-threaded-wheel-windows-test-vs2019-${PYTHON_WHEEL_WINDOWS_IMAGE_REVISION}
image: ${REPO}:python-3.13-free-threaded-wheel-windows-test-vs2019-${PYTHON_WHEEL_WINDOWS_TEST_IMAGE_REVISION}
build:
args:
base: ${REPO}:python-wheel-windows-test-vs2019-base-${PYTHON_WHEEL_WINDOWS_IMAGE_REVISION}
base: ${REPO}:python-wheel-windows-test-vs2019-base-${PYTHON_WHEEL_WINDOWS_TEST_IMAGE_REVISION}
context: .
dockerfile: ci/docker/python-free-threaded-wheel-windows-test-vs2019.dockerfile
volumes: *python-wheel-windows-vs2019-volumes
9 changes: 1 addition & 8 deletions python/setup.py
Original file line number Diff line number Diff line change
@@ -268,7 +268,7 @@ def _run_cmake(self):
f'-DCMAKE_INSTALL_PREFIX={install_prefix}',
f'-DPYTHON_EXECUTABLE={sys.executable}',
f'-DPython3_EXECUTABLE={sys.executable}',
f'-DPYARROW_CXXFLAGS={self._get_cxxflags()}',
f'-DPYARROW_CXXFLAGS={self.cmake_cxxflags}',
]

def append_cmake_bool(value, varname):
@@ -367,13 +367,6 @@ def _get_cmake_ext_path(self, name):
filename = name + ext_suffix
return pjoin(self._get_build_dir(), filename)

def _get_cxxflags(self):
# Workaround for https://github.com/pypa/setuptools/issues/4662
cxxflags = self.cmake_cxxflags
if os.name == 'nt' and bool(sysconfig.get_config_var('Py_GIL_DISABLED')):
cxxflags += " -DPy_GIL_DISABLED=1"
return cxxflags

def get_ext_generated_cpp_source(self, name):
if sys.platform == 'win32':
head, tail = os.path.split(name)

0 comments on commit b3ce08c

Please sign in to comment.