8000 Merge pull request #16114 from charris/backport-16101 · numpy/numpy@373fb29 · GitHub
[go: up one dir, main page]

Skip to content

Commit 373fb29

Browse files
authored
Merge pull request #16114 from charris/backport-16101
BLD: put openblas library in local directory on windows
2 parents ea0eb1b + f591381 commit 373fb29

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

azure-steps-windows.yml

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,21 @@ steps:
99
- script: python -m pip install -r test_requirements.txt
1010
displayName: 'Install dependencies; some are optional to avoid test skips'
1111
- powershell: |
12-
$pyversion = python -c "from __future__ import print_function; import sys; print(sys.version.split()[0])"
13-
Write-Host "Python Version: $pyversion"
14-
$target = "C:\\hostedtoolcache\\windows\\Python\\$pyversion\\$(PYTHON_ARCH)\\lib\\openblas$env:OPENBLAS_SUFFIX.a"
15-
Write-Host "target path: $target"
16-
$openblas = python tools/openblas_support.py
17-
cp $openblas $target
12+
$ErrorActionPreference = "Stop"
13+
# Download and get the path to "openblas.a". We cannot copy it
14+
# to $PYTHON_EXE's directory since that is on a different drive which
15+
# mingw does not like. Instead copy it to a directory and set OPENBLAS,
16+
# since OPENBLAS will be picked up by the openblas discovery
17+
python -m pip install urllib3
18+
$target = $(python tools/openblas_support.py)
19+
mkdir openblas
20+
echo Copying $target to openblas/openblas$env:OPENBLAS_SUFFIX.a
21+
cp $target openblas/openblas$env:OPENBLAS_SUFFIX.a
22+
If ( Test-Path env:NPY_USE_BLAS_ILP64 ){
23+
echo "##vso[task.setvariable variable=OPENBLAS64_]$pwd\openblas"
24+
} else {
25+
echo "##vso[task.setvariable variable=OPENBLAS]$pwd\openblas"
26+
}
1827
displayName: 'Download / Install OpenBLAS'
1928

2029
- powershell: |
@@ -31,15 +40,15 @@ steps:
3140
refreshenv
3241
}
3342
python -c "from tools import openblas_support; openblas_support.make_init('numpy')"
34-
pip wheel -v -v -v --wheel-dir=dist .
43+
pip wheel -v -v -v --no-build-isolation --no-use-pep517 --wheel-dir=dist .
3544
3645
ls dist -r | Foreach-Object {
3746
pip install $_.FullName
3847
}
3948
displayName: 'Build NumPy'
4049
- bash: |
4150
pushd . && cd .. && target=$(python -c "import numpy, os; print(os.path.abspath(os.path.join(os.path.dirname(numpy.__file__), '.libs')))") && popd
42-
pip download -d destination --only-binary --no-deps numpy==1.14
51+
pip download -d destination --only-binary :all: --no-deps numpy==1.14
4352
cd destination && unzip numpy*.whl && cp numpy/.libs/*.dll $target
4453
ls $target
4554
displayName: 'Add extraneous & older DLL to numpy/.libs to probe DLL handling robustness'
@@ -53,4 +62,4 @@ steps:
5362
inputs:
5463
testResultsFiles: '**/test-*.xml'
5564
failTaskOnFailedTests: true
56-
testRunTitle: 'Publish test results for Python $(PYTHON_VERSION) $(BITS)-bit $(TEST_MODE) Windows'
65+
testRunTitle: 'Publish test results for Python $(PYTHON_VERSION) $(BITS)-bit $(TEST_MODE) Windows'

0 commit comments

Comments
 (0)
0