diff options
author | Matti Picus <matti.picus@gmail.com> | 2020-04-29 18:53:44 +0300 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2020-04-29 17:42:10 -0600 |
commit | f5913813523a588d1878d0ab9fd266d2c435464f (patch) | |
tree | b18b926a7133a2d25ba64612bca57ae1d0314c0c | |
parent | ea0eb1bef61440101961a17a078cc31e6ab5925d (diff) | |
download | numpy-f5913813523a588d1878d0ab9fd266d2c435464f.tar.gz |
BLD: put openblas library in local directory on windows (#16101)
* BLD: put openblas library in local directory on windows
* TST: fix broken pip install on windows
* BLD: handle 64-bit windows BLAS
-rw-r--r-- | azure-steps-windows.yml | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/azure-steps-windows.yml b/azure-steps-windows.yml index f17039455..46b8c1ff9 100644 --- a/azure-steps-windows.yml +++ b/azure-steps-windows.yml @@ -9,12 +9,21 @@ steps: - script: python -m pip install -r test_requirements.txt displayName: 'Install dependencies; some are optional to avoid test skips' - powershell: | - $pyversion = python -c "from __future__ import print_function; 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" - $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/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: | @@ -31,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 @@ -39,7 +48,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' @@ -53,4 +62,4 @@ steps: inputs: testResultsFiles: '**/test-*.xml' failTaskOnFailedTests: true - testRunTitle: 'Publish test results for Python $(PYTHON_VERSION) $(BITS)-bit $(TEST_MODE) Windows'
\ No newline at end of file + testRunTitle: 'Publish test results for Python $(PYTHON_VERSION) $(BITS)-bit $(TEST_MODE) Windows' |