Skip to content
This repository was archived by the owner on May 3, 2023. It is now read-only.

Automatically check for missing DLLs on Windows #160

Merged
merged 6 commits into from
Jan 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- template: azure/windows.yml
parameters:
name: windows
vmImage: vs2017-win2016
vmImage: windows-2019
matrix:
py_3.8_32:
PYTHON_VERSION: "3.8"
Expand Down
14 changes: 12 additions & 2 deletions azure/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -88,6 +91,13 @@ jobs:
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: and(eq(variables['SKIP_BUILD'], 'false'), eq(variables['PYTHON_ARCH'], 'x64'))

- bash: echo "##vso[task.prependpath]$CONDA/Scripts"
displayName: Add conda to PATH
condition: and(succeeded(), eq(variables['SKIP_BUILD'], 'false'), ne(variables['Build.Reason'], 'PullRequest'))
Expand Down
4 changes: 4 additions & 0 deletions check_windows_dlls.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
python --version
pip install pytz six numpy python-dateutil
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why six?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its a dependency of python-dateutil.

pip install --find-links=pandas/pandas/dist --no-index pandas
python -c "import pandas as pd; print(pd.__version__)"