4
4
versionSpec : $(PYTHON_VERSION)
5
5
addToPath : true
6
6
architecture : $(PYTHON_ARCH)
7
- - script : python -m pip install --upgrade pip
7
+ condition : not(contains(variables['PYTHON_VERSION'], 'PyPy'))
8
+ - powershell : |
9
+ $url = "http://buildbot.pypy.org/nightly/py3.6/pypy-c-jit-latest-win32.zip"
10
+ $output = "pypy.zip"
11
+ $wc = New-Object System.Net.WebClient
12
+ $wc.DownloadFile($url, $output)
13
+ echo "downloaded $url to $output"
14
+ mkdir pypy3
15
+ Expand-Archive $output -DestinationPath pypy3
16
+ move pypy3/pypy-c-*/* pypy3
17
+ cp pypy3/pypy3.exe pypy3/python.exe
18
+ $pypypath = Join-Path (Get-Item .).FullName pypy3
19
+ $env:Path = $pypypath + ";" + $env:Path
20
+ setx PATH $env:Path
21
+ python -mensurepip
22
+ echo "##vso[task.prependpath]$pypypath"
23
+ condition : contains(variables['PYTHON_VERSION'], 'PyPy')
24
+ displayName : " Install PyPy pre-release"
25
+
26
+ - script : python -m pip install --upgrade pip wheel
8
27
displayName : ' Install tools'
28
+
9
29
- script : python -m pip install -r test_requirements.txt
10
30
displayName : ' Install dependencies; some are optional to avoid test skips'
31
+
11
32
- powershell : |
12
33
$ErrorActionPreference = "Stop"
13
34
# Download and get the path to "openblas.a". We cannot copy it
16
37
# since OPENBLAS will be picked up by the openblas discovery
17
38
$target = $(python tools/openblas_support.py)
18
39
mkdir openblas
19
- echo Copying $target to openblas/openblas$env:OPENBLAS_SUFFIX.a
40
+ echo " Copying $target to openblas/openblas$env:OPENBLAS_SUFFIX.a"
20
41
cp $target openblas/openblas$env:OPENBLAS_SUFFIX.a
21
42
If ( Test-Path env:NPY_USE_BLAS_ILP64 ){
22
43
echo "##vso[task.setvariable variable=OPENBLAS64_]$pwd\openblas"
@@ -27,35 +48,40 @@ steps:
27
48
28
49
- powershell : |
29
50
choco install -y mingw --forcex86 --force --version=7.3.0
51
+ refreshenv
30
52
displayName : ' Install 32-bit mingw for 32-bit builds'
31
53
condition : eq(variables['BITS'], 32)
32
54
# NOTE: for Windows builds it seems much more tractable to use runtests.py
33
55
# vs. manual setup.py and then runtests.py for testing only
56
+
34
57
- powershell : |
35
58
If ($(BITS) -eq 32) {
36
59
$env:CFLAGS = "-m32"
37
60
$env:LDFLAGS = "-m32"
38
61
$env:PATH = "C:\\ProgramData\\chocolatey\\lib\\mingw\\tools\\install\\mingw$(BITS)\\bin;" + $env:PATH
39
- refreshenv
40
62
}
41
63
python -c "from tools import openblas_support; openblas_support.make_init('numpy')"
42
- pip wheel -v -v -v --no-build-isolation --no-use-pep517 --wheel-dir=dist .
64
+ python -m pip wheel -v -v -v --no-build-isolation --no-use-pep517 --wheel-dir=dist .
43
65
44
66
ls dist -r | Foreach-Object {
45
- pip install $_.FullName
67
+ python -m pip install $_.FullName
46
68
}
47
69
displayName : ' Build NumPy'
70
+
48
71
- bash : |
49
72
pushd . && cd .. && target=$(python -c "import numpy, os; print(os.path.abspath(os.path.join(os.path.dirname(numpy.__file__), '.libs')))") && popd
50
- pip download -d destination --only-binary :all: --no-deps numpy==1.14
73
+ python -m pip download -d destination --only-binary :all: --no-deps numpy==1.14
51
74
cd destination && unzip numpy*.whl && cp numpy/.libs/*.dll $target
52
75
ls $target
53
76
displayName : ' Add extraneous & older DLL to numpy/.libs to probe DLL handling robustness'
54
77
condition : eq(variables['PYTHON_VERSION'], '3.6')
55
78
- script : pushd . && cd .. && python -c "from ctypes import windll; windll.kernel32.SetDefaultDllDirectories(0x00000800); import numpy" && popd
56
79
displayName : ' For gh-12667; Windows DLL resolution'
80
+ condition : eq(variables['PYTHON_VERSION'], '3.6')
81
+
57
82
- script : python runtests.py -n --show-build-log --mode=$(TEST_MODE) -- -rsx --junitxml=junit/test-results.xml
58
83
displayName : ' Run NumPy Test Suite'
84
+
59
85
- task : PublishTestResults@2
60
86
condition : succeededOrFailed()
61
87
inputs :
0 commit comments