From bf2287f67839c0739b0ddbbc21d4f46c8ef6ab7f Mon Sep 17 00:00:00 2001 From: Alenka Frim Date: Thu, 15 Sep 2022 10:05:29 +0200 Subject: [PATCH 1/5] Try setting CONDA_DLL_SEARCH_MODIFICATION_ENABLE=1 and remove mark from test_cython_api() --- ci/appveyor-cpp-setup.bat | 1 + python/pyarrow/tests/test_cython.py | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ci/appveyor-cpp-setup.bat b/ci/appveyor-cpp-setup.bat index f9390e9be5a..7834e4bfa9b 100644 --- a/ci/appveyor-cpp-setup.bat +++ b/ci/appveyor-cpp-setup.bat @@ -55,6 +55,7 @@ mamba update -q -y -c conda-forge --all || exit /B @rem Create conda environment @rem +set CONDA_DLL_SEARCH_MODIFICATION_ENABLE=1 set CONDA_PACKAGES= if "%ARROW_BUILD_GANDIVA%" == "ON" ( diff --git a/python/pyarrow/tests/test_cython.py b/python/pyarrow/tests/test_cython.py index 6c1c47f2a24..7152f3f1d44 100644 --- a/python/pyarrow/tests/test_cython.py +++ b/python/pyarrow/tests/test_cython.py @@ -81,8 +81,6 @@ def check_cython_example_module(mod): mod.cast_scalar(scal, pa.list_(pa.int64())) -@pytest.mark.skipif(sys.platform == "win32", - reason="ARROW-17172: currently fails on windows") @pytest.mark.cython def test_cython_api(tmpdir): """ From 59c7abb50e78b14463e134b2ed40f85000331d98 Mon Sep 17 00:00:00 2001 From: Alenka Frim Date: Thu, 15 Sep 2022 10:59:32 +0200 Subject: [PATCH 2/5] Remove CONDA_DLL_SEARCH_MODIFICATION_ENABLE --- ci/appveyor-cpp-setup.bat | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/appveyor-cpp-setup.bat b/ci/appveyor-cpp-setup.bat index 7834e4bfa9b..f9390e9be5a 100644 --- a/ci/appveyor-cpp-setup.bat +++ b/ci/appveyor-cpp-setup.bat @@ -55,7 +55,6 @@ mamba update -q -y -c conda-forge --all || exit /B @rem Create conda environment @rem -set CONDA_DLL_SEARCH_MODIFICATION_ENABLE=1 set CONDA_PACKAGES= if "%ARROW_BUILD_GANDIVA%" == "ON" ( From 6ff7bd53a9a03a3139955b7da2b25785ac572d93 Mon Sep 17 00:00:00 2001 From: Alenka Frim Date: Thu, 15 Sep 2022 13:15:26 +0200 Subject: [PATCH 3/5] Restore change --- ci/appveyor-cpp-setup.bat | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/appveyor-cpp-setup.bat b/ci/appveyor-cpp-setup.bat index f9390e9be5a..7834e4bfa9b 100644 --- a/ci/appveyor-cpp-setup.bat +++ b/ci/appveyor-cpp-setup.bat @@ -55,6 +55,7 @@ mamba update -q -y -c conda-forge --all || exit /B @rem Create conda environment @rem +set CONDA_DLL_SEARCH_MODIFICATION_ENABLE=1 set CONDA_PACKAGES= if "%ARROW_BUILD_GANDIVA%" == "ON" ( From 9932546c763446695d30b4948c54ba51fa37d2c2 Mon Sep 17 00:00:00 2001 From: Alenka Frim Date: Thu, 15 Sep 2022 16:03:11 +0200 Subject: [PATCH 4/5] Add message about CONDA_DLL_SEARCH_MODIFICATION_ENABLE --- ci/appveyor-cpp-setup.bat | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ci/appveyor-cpp-setup.bat b/ci/appveyor-cpp-setup.bat index 7834e4bfa9b..fc2178cf985 100644 --- a/ci/appveyor-cpp-setup.bat +++ b/ci/appveyor-cpp-setup.bat @@ -55,6 +55,11 @@ mamba update -q -y -c conda-forge --all || exit /B @rem Create conda environment @rem +@rem Workaround for ARROW-17172 +@rem Due to failing test_cython_api() import of an external module in the +@rem subprocess this env var is added for os.add_dll_directory to work as +@rem expected in the conda environment and for the import to succeed. +@rem See: https://github.com/ContinuumIO/anaconda-issues/issues/12475 set CONDA_DLL_SEARCH_MODIFICATION_ENABLE=1 set CONDA_PACKAGES= From 2628b615b06ad3eb0a4d28c77841028668b6699f Mon Sep 17 00:00:00 2001 From: Alenka Frim Date: Thu, 15 Sep 2022 16:09:59 +0200 Subject: [PATCH 5/5] Apply pitrou's suggestion for the comment Co-authored-by: Antoine Pitrou --- ci/appveyor-cpp-setup.bat | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ci/appveyor-cpp-setup.bat b/ci/appveyor-cpp-setup.bat index fc2178cf985..9e4e4ad5dce 100644 --- a/ci/appveyor-cpp-setup.bat +++ b/ci/appveyor-cpp-setup.bat @@ -56,10 +56,8 @@ mamba update -q -y -c conda-forge --all || exit /B @rem @rem Workaround for ARROW-17172 -@rem Due to failing test_cython_api() import of an external module in the -@rem subprocess this env var is added for os.add_dll_directory to work as -@rem expected in the conda environment and for the import to succeed. -@rem See: https://github.com/ContinuumIO/anaconda-issues/issues/12475 +@rem This seems necessary for test_cython.py to succeed, otherwise +@rem the extension module being built would fail loading in a subprocess. set CONDA_DLL_SEARCH_MODIFICATION_ENABLE=1 set CONDA_PACKAGES=