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

Fix dll issue #149

Closed
wants to merge 12 commits into from
Closed
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
4 changes: 2 additions & 2 deletions 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.7_32:
PYTHON_VERSION: "3.7"
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
- template: azure/posix.yml
parameters:
name: macOS
vmImage: macOS-10.14
vmImage: macOS-10.15
matrix:
py_3.7_64:
MB_PYTHON_VERSION: "3.7"
Expand Down
215 changes: 115 additions & 100 deletions azure/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,109 +19,124 @@ jobs:
strategy:
matrix:
${{ insert }}: ${{ parameters.matrix }}
steps:
- checkout: self
submodules: true
stages:
- stage build:
steps:
- checkout: self
submodules: true

- task: UsePythonVersion@0
inputs:
versionSpec: $(PYTHON_VERSION)
architecture: $(PYTHON_ARCH)
displayName: Set python version
- task: UsePythonVersion@0
inputs:
versionSpec: $(PYTHON_VERSION)
architecture: $(PYTHON_ARCH)
displayName: Set python version

- bash: |
set -e
echo PYTHON $PYTHON_VERSION $PYTHON_ARCH
echo Build Reason: $BUILD_REASON
python --version
python -c "import struct; print(struct.calcsize('P') * 8)"
pip --version
displayName: Check that we have the expected version and architecture for Python
- bash: |
set -e
SKIP_BUILD="false"
if [ "$BUILD_REASON" == "Schedule" ]; then
BUILD_COMMIT=$NIGHTLY_BUILD_COMMIT
if [ "$NIGHTLY_BUILD" != "true" ]; then
SKIP_BUILD="true"
- bash: |
set -e
echo PYTHON $PYTHON_VERSION $PYTHON_ARCH
echo Build Reason: $BUILD_REASON
python --version
python -c "import struct; print(struct.calcsize('P') * 8)"
pip --version
displayName: Check that we have the expected version and architecture for Python
- bash: |
set -e
SKIP_BUILD="false"
if [ "$BUILD_REASON" == "Schedule" ]; then
BUILD_COMMIT=$NIGHTLY_BUILD_COMMIT
if [ "$NIGHTLY_BUILD" != "true" ]; then
SKIP_BUILD="true"
fi
fi
fi
echo "Building pandas@$BUILD_COMMIT"
echo "##vso[task.setvariable variable=BUILD_COMMIT]$BUILD_COMMIT"
echo "##vso[task.setvariable variable=SKIP_BUILD]$SKIP_BUILD"
# Store original Python path to be able to create test_venv pointing
# to same Python version.
PYTHON_EXE=`which python`
echo "##vso[task.setvariable variable=PYTHON_EXE]$PYTHON_EXE"
displayName: Define build env variables
- bash: |
set -e
cd pandas
git checkout $BUILD_COMMIT
git clean -fxd
git reset --hard
displayName: Checkout pandas commit
condition: eq(variables['SKIP_BUILD'], 'false')
- bash: |
set -e
pip install --timeout=60 numpy==$NP_BUILD_DEP
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
python setup.py build
python setup.py bdist_wheel
ls dist
twine check dist/*
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')
echo "Building pandas@$BUILD_COMMIT"
echo "##vso[task.setvariable variable=BUILD_COMMIT]$BUILD_COMMIT"
echo "##vso[task.setvariable variable=SKIP_BUILD]$SKIP_BUILD"
# Store original Python path to be able to create test_venv pointing
# to same Python version.
PYTHON_EXE=`which python`
echo "##vso[task.setvariable variable=PYTHON_EXE]$PYTHON_EXE"
displayName: Define build env variables
- bash: |
set -e
cd pandas
git checkout $BUILD_COMMIT
git clean -fxd
git reset --hard
displayName: Checkout pandas commit
condition: eq(variables['SKIP_BUILD'], 'false')
- bash: |
set -e
pip install --timeout=60 numpy==$NP_BUILD_DEP
pip install --timeout=60 $TEST_DEPENDS Cython==$CYTHON_BUILD_DEP
pip install twine wheel delvewheel
pushd pandas
cp "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Redist/MSVC/14.29.30036/$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.30036/x64/Microsoft.VC142.CRT/vcruntime140_1.dll" pandas/_libs/window
python setup.py build
python setup.py bdist_wheel
ls dist
twine check dist/*
# Delvewheel doesn't support using the directory path :(
# We are just using delvewheel right now to list dll dependencies not copy them
export WHEEL_PATH="dist/$(ls dist)"
delvewheel show $WHEEL_PATH
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: echo "##vso[task.prependpath]$CONDA/Scripts"
displayName: Add conda to PATH
condition: and(succeeded(), eq(variables['SKIP_BUILD'], 'false'), ne(variables['Build.Reason'], 'PullRequest'))
- 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'))

- bash: conda install -q -y anaconda-client
displayName: Install anaconda-client
condition: and(succeeded(), eq(variables['SKIP_BUILD'], 'false'), ne(variables['Build.Reason'], 'PullRequest'))
- bash: conda install -q -y anaconda-client
displayName: Install anaconda-client
condition: and(succeeded(), eq(variables['SKIP_BUILD'], 'false'), ne(variables['Build.Reason'], 'PullRequest'))

- bash: |
set -e
if [ "$BUILD_REASON" == "Schedule" ]; then
ANACONDA_ORG="scipy-wheels-nightly"
TOKEN="$PANDAS_NIGHTLY_UPLOAD_TOKEN"
else
ANACONDA_ORG="multibuild-wheels-staging"
TOKEN="$PANDAS_STAGING_UPLOAD_TOKEN"
fi
if [ "$TOKEN" == "" ]; then
echo "##[warning] Could not find anaconda.org upload token in secret variables"
fi
echo "##vso[task.setvariable variable=TOKEN]$TOKEN"
echo "##vso[task.setvariable variable=ANACONDA_ORG]$ANACONDA_ORG"
displayName: Retrieve secret upload token
condition: and(succeeded(), eq(variables['SKIP_BUILD'], 'false'), ne(variables['Build.Reason'], 'PullRequest'))
env:
# Secret variables need to mapped to env variables explicitly:
PANDAS_NIGHTLY_UPLOAD_TOKEN: $(PANDAS_NIGHTLY_UPLOAD_TOKEN)
PANDAS_STAGING_UPLOAD_TOKEN: $(PANDAS_STAGING_UPLOAD_TOKEN)
- bash: |
set -e
# The --force option forces a replacement if the remote file already
# exists.
ls pandas/dist/pandas-*.whl
anaconda -t $TOKEN upload --force -u $ANACONDA_ORG pandas/dist/pandas-*.whl
echo "PyPI-style index: https://pypi.anaconda.org/$ANACONDA_ORG/simple"
displayName: Upload to anaconda.org (only if secret token is retrieved)
condition: ne(variables['TOKEN'], '')
- bash: |
set -e
if [ "$BUILD_REASON" == "Schedule" ]; then
ANACONDA_ORG="scipy-wheels-nightly"
TOKEN="$PANDAS_NIGHTLY_UPLOAD_TOKEN"
else
ANACONDA_ORG="multibuild-wheels-staging"
TOKEN="$PANDAS_STAGING_UPLOAD_TOKEN"
fi
if [ "$TOKEN" == "" ]; then
echo "##[warning] Could not find anaconda.org upload token in secret variables"
fi
echo "##vso[task.setvariable variable=TOKEN]$TOKEN"
echo "##vso[task.setvariable variable=ANACONDA_ORG]$ANACONDA_ORG"
displayName: Retrieve secret upload token
condition: and(succeeded(), eq(variables['SKIP_BUILD'], 'false'), ne(variables['Build.Reason'], 'PullRequest'))
env:
# Secret variables need to mapped to env variables explicitly:
PANDAS_NIGHTLY_UPLOAD_TOKEN: $(PANDAS_NIGHTLY_UPLOAD_TOKEN)
PANDAS_STAGING_UPLOAD_TOKEN: $(PANDAS_STAGING_UPLOAD_TOKEN)
- bash: |
set -e
# The --force option forces a replacement if the remote file already
# exists.
ls pandas/dist/pandas-*.whl
anaconda -t $TOKEN upload --force -u $ANACONDA_ORG pandas/dist/pandas-*.whl
echo "PyPI-style index: https://pypi.anaconda.org/$ANACONDA_ORG/simple"
displayName: Upload to anaconda.org (only if secret token is retrieved)
condition: ne(variables['TOKEN'], '')

- publish: pandas/dist
artifact: $(Agent.JobName)

- stage verify:
dependsOn: build
steps:
- download: current
artifact: $(Agent.JobName)