From 65fc101f24fa1a9c01b483e34c6f562a4e895a69 Mon Sep 17 00:00:00 2001 From: mattip Date: Tue, 28 Apr 2020 23:20:04 +0300 Subject: [PATCH 1/3] BLD: put openblas library in local directory on windows --- azure-steps-windows.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/azure-steps-windows.yml b/azure-steps-windows.yml index eddc6a9b9aec..68f20a731c59 100644 --- a/azure-steps-windows.yml +++ b/azure-steps-windows.yml @@ -9,13 +9,17 @@ steps: - script: python -m pip install -r test_requirements.txt displayName: 'Install dependencies; some are optional to avoid test skips' - powershell: | - $pyversion = python -c "import sys; print(sys.version.split()[0])" - Write-Host "Python Version: $pyversion" - $target = "C:\\hostedtoolcache\\windows\\Python\\$pyversion\\$(PYTHON_ARCH)\\lib\\openblas$env:OPENBLAS_SUFFIX.a" - Write-Host "target path: $target" - python -mpip install urllib3 - $openblas = python tools/openblas_support.py - cp $openblas $target + $ErrorActionPreference = "Stop" + # Download and get the path to "openblas.a". We cannot copy it + # to $PYTHON_EXE's directory since that is on a different drive which + # mingw does not like. Instead copy it to a directory and set OPENBLAS, + # since OPENBLAS will be picked up by the openblas discovery + python -m pip install urllib3 + $target = $(python tools/openblas_support.py) + mkdir openblas + echo Copying $target to openblas + cp $target openblas + echo "##vso[task.setvariable variable=OPENBLAS]$pwd\openblas" displayName: 'Download / Install OpenBLAS' - powershell: | From 7038c65af64a762d38aeb2fcaa1b7ab0c955941c Mon Sep 17 00:00:00 2001 From: mattip Date: Wed, 29 Apr 2020 00:40:24 +0300 Subject: [PATCH 2/3] TST: fix broken pip install on windows --- azure-steps-windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-steps-windows.yml b/azure-steps-windows.yml index 68f20a731c59..1d153816d361 100644 --- a/azure-steps-windows.yml +++ b/azure-steps-windows.yml @@ -44,7 +44,7 @@ steps: displayName: 'Build NumPy' - bash: | pushd . && cd .. && target=$(python -c "import numpy, os; print(os.path.abspath(os.path.join(os.path.dirname(numpy.__file__), '.libs')))") && popd - pip download -d destination --only-binary --no-deps numpy==1.14 + pip download -d destination --only-binary :all: --no-deps numpy==1.14 cd destination && unzip numpy*.whl && cp numpy/.libs/*.dll $target ls $target displayName: 'Add extraneous & older DLL to numpy/.libs to probe DLL handling robustness' From e511380b1687eca25e43f22cb69f5717a67f3f28 Mon Sep 17 00:00:00 2001 From: mattip Date: Wed, 29 Apr 2020 01:43:06 +0300 Subject: [PATCH 3/3] BLD: handle 64-bit windows BLAS --- azure-steps-windows.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/azure-steps-windows.yml b/azure-steps-windows.yml index 1d153816d361..46b8c1ff9b31 100644 --- a/azure-steps-windows.yml +++ b/azure-steps-windows.yml @@ -17,9 +17,13 @@ steps: python -m pip install urllib3 $target = $(python tools/openblas_support.py) mkdir openblas - echo Copying $target to openblas - cp $target openblas - echo "##vso[task.setvariable variable=OPENBLAS]$pwd\openblas" + echo Copying $target to openblas/openblas$env:OPENBLAS_SUFFIX.a + cp $target openblas/openblas$env:OPENBLAS_SUFFIX.a + If ( Test-Path env:NPY_USE_BLAS_ILP64 ){ + echo "##vso[task.setvariable variable=OPENBLAS64_]$pwd\openblas" + } else { + echo "##vso[task.setvariable variable=OPENBLAS]$pwd\openblas" + } displayName: 'Download / Install OpenBLAS' - powershell: | @@ -36,7 +40,7 @@ steps: refreshenv } python -c "from tools import openblas_support; openblas_support.make_init('numpy')" - pip wheel -v -v -v --wheel-dir=dist . + pip wheel -v -v -v --no-build-isolation --no-use-pep517 --wheel-dir=dist . ls dist -r | Foreach-Object { pip install $_.FullName