From b25d6e98da312f944d0aabe6278c1b4e02539052 Mon Sep 17 00:00:00 2001 From: Thomas Li <47963215+lithomas1@users.noreply.github.com> Date: Tue, 26 Oct 2021 08:24:25 -0700 Subject: [PATCH 1/4] Fix dll issue (#4) * Update windows.yml * Update azure-pipelines.yml * Syntax error? * Update azure-pipelines.yml * Temp revert this to see if CI picks it up and fails as expected * Update azure-pipelines.yml * Update azure-pipelines.yml * Update azure-pipelines.yml * Update azure-pipelines.yml * Update azure-pipelines.yml * Update azure-pipelines.yml * Update azure-pipelines.yml * Update windows.yml * Update windows.yml * Update windows.yml * Update windows.yml * Update windows.yml * Update azure-pipelines.yml * Update windows.yml * Update windows.yml * Update azure-pipelines.yml * Update windows.yml * Update windows.yml * Update windows.yml * Update windows.yml * Update windows.yml * Update windows.yml * Update windows.yml * Update windows.yml * Update windows.yml * Update windows.yml * Update windows.yml * Update windows.yml * Update windows.yml * Update windows.yml * Update windows.yml * Update windows.yml * Update windows.yml * Update windows.yml * Update windows.yml * Update windows.yml * Update windows.yml * Update azure-pipelines.yml * Update windows.yml * Update windows.yml * Update windows.yml * Update windows.yml * Update windows.yml * Create check_windows_dlls.sh * Update windows.yml * Update windows.yml * Update check_windows_dlls.sh * Update windows.yml * Update windows.yml * Update and rename check_windows_dlls.sh to check_windows_dlls.bat * Update windows.yml * Update check_windows_dlls.bat * Update check_windows_dlls.bat * Update check_windows_dlls.bat * Update windows.yml * [skip ci] un comment code * [skip ci] remove comments --- azure-pipelines.yml | 7 ++++++- azure/windows.yml | 34 ++++++++++++++++++++++------------ check_windows_dlls.bat | 4 ++++ 3 files changed, 32 insertions(+), 13 deletions(-) create mode 100644 check_windows_dlls.bat diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 0334b7d..7491b5c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -13,11 +13,16 @@ trigger: pr: - master +resources: + containers: + - container: windows-container + image: mcr.microsoft.com/windows/servercore:ltsc2019 + jobs: - template: azure/windows.yml parameters: name: windows - vmImage: vs2017-win2016 + vmImage: windows-2019 matrix: py_3.7_32: PYTHON_VERSION: "3.7" diff --git a/azure/windows.yml b/azure/windows.yml index 8effbe6..ed11cb8 100644 --- a/azure/windows.yml +++ b/azure/windows.yml @@ -68,8 +68,11 @@ jobs: pip install --timeout=60 $TEST_DEPENDS Cython==$CYTHON_BUILD_DEP pip install twine wheel pushd pandas - cp "C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Redist/MSVC/14.16.27012/$PYTHON_ARCH/Microsoft.VC141.CRT/msvcp140.dll" pandas/_libs/window - cp "C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Redist/MSVC/14.16.27012/$PYTHON_ARCH/Microsoft.VC141.CRT/concrt140.dll" pandas/_libs/window + cp "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Redist/MSVC/14.29.30133/$PYTHON_ARCH/Microsoft.VC142.CRT/msvcp140.dll" pandas/_libs/window + cp "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Redist/MSVC/14.29.30133/$PYTHON_ARCH/Microsoft.VC142.CRT/concrt140.dll" pandas/_libs/window + if [ "$PYTHON_ARCH" == "x64" ]; then + cp "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Redist/MSVC/14.29.30133/x64/Microsoft.VC142.CRT/vcruntime140_1.dll" pandas/_libs/window + fi python setup.py build python setup.py bdist_wheel ls dist @@ -77,16 +80,23 @@ jobs: popd displayName: Build wheel condition: eq(variables['SKIP_BUILD'], 'false') - - bash: | - set -e - source extra_functions.sh - source config.sh - setup_test_venv - pip install pandas/dist/pandas-*.whl - run_tests - teardown_test_venv - displayName: Install wheel and test - condition: eq(variables['SKIP_BUILD'], 'false') + - bash: | + set -e + source extra_functions.sh + source config.sh + setup_test_venv + pip install pandas/dist/pandas-*.whl + run_tests + teardown_test_venv + displayName: Install wheel and test + condition: eq(variables['SKIP_BUILD'], 'false') + + - script: | + docker pull python:$(PYTHON_VERSION)-windowsservercore + docker run -v %cd%:c:\pandas python:$(PYTHON_VERSION)-windowsservercore /pandas/check_windows_dlls.bat + displayName: Ensure wheel imports correctly + # No Windows images for x86 + condition: eq(variables['PYTHON_ARCH'], 'x64') - bash: echo "##vso[task.prependpath]$CONDA/Scripts" displayName: Add conda to PATH diff --git a/check_windows_dlls.bat b/check_windows_dlls.bat new file mode 100644 index 0000000..f7b04be --- /dev/null +++ b/check_windows_dlls.bat @@ -0,0 +1,4 @@ +python --version +pip install pytz six numpy python-dateutil +pip install --find-links=pandas/pandas/dist --no-index pandas +python -c "import pandas as pd; print(pd.__version__)" From 2940d5060ccd161c81f4cd3284a9e48a23d57a11 Mon Sep 17 00:00:00 2001 From: Thomas Li <47963215+lithomas1@users.noreply.github.com> Date: Tue, 26 Oct 2021 08:25:19 -0700 Subject: [PATCH 2/4] cleanups --- azure-pipelines.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7491b5c..b71aec5 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -13,11 +13,6 @@ trigger: pr: - master -resources: - containers: - - container: windows-container - image: mcr.microsoft.com/windows/servercore:ltsc2019 - jobs: - template: azure/windows.yml parameters: From cd6ee04fd79ce5aafd8a2374ffb599d7f6060c69 Mon Sep 17 00:00:00 2001 From: Thomas Li <47963215+lithomas1@users.noreply.github.com> Date: Tue, 26 Oct 2021 15:44:52 -0700 Subject: [PATCH 3/4] Update windows.yml --- azure/windows.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/azure/windows.yml b/azure/windows.yml index ed11cb8..00d1a24 100644 --- a/azure/windows.yml +++ b/azure/windows.yml @@ -80,17 +80,17 @@ jobs: popd displayName: Build wheel condition: eq(variables['SKIP_BUILD'], 'false') - - bash: | - set -e - source extra_functions.sh - source config.sh - setup_test_venv - pip install pandas/dist/pandas-*.whl - run_tests - teardown_test_venv - displayName: Install wheel and test - condition: eq(variables['SKIP_BUILD'], 'false') - + - bash: | + set -e + source extra_functions.sh + source config.sh + setup_test_venv + pip install pandas/dist/pandas-*.whl + run_tests + teardown_test_venv + displayName: Install wheel and test + condition: eq(variables['SKIP_BUILD'], 'false') + - script: | docker pull python:$(PYTHON_VERSION)-windowsservercore docker run -v %cd%:c:\pandas python:$(PYTHON_VERSION)-windowsservercore /pandas/check_windows_dlls.bat From 58c067f4e2e6f54cb6ca5e4755915ce836feab4a Mon Sep 17 00:00:00 2001 From: Thomas Li <47963215+lithomas1@users.noreply.github.com> Date: Tue, 26 Oct 2021 20:57:27 -0700 Subject: [PATCH 4/4] Update windows.yml --- azure/windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure/windows.yml b/azure/windows.yml index 00d1a24..9613a74 100644 --- a/azure/windows.yml +++ b/azure/windows.yml @@ -96,7 +96,7 @@ jobs: docker run -v %cd%:c:\pandas python:$(PYTHON_VERSION)-windowsservercore /pandas/check_windows_dlls.bat displayName: Ensure wheel imports correctly # No Windows images for x86 - condition: eq(variables['PYTHON_ARCH'], 'x64') + condition: and(eq(variables['SKIP_BUILD'], 'false'), eq(variables['PYTHON_ARCH'], 'x64')) - bash: echo "##vso[task.prependpath]$CONDA/Scripts" displayName: Add conda to PATH