Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit c8a29b6

Browse files
committed
WIP: add aarch64, ppc64le, x390x wheels; change build slightly
1 parent 73c0b3f commit c8a29b6

File tree

6 files changed

+42
-231
lines changed

6 files changed

+42
-231
lines changed

.appveyor.yml

-185
Original file line numberDiff line numberDiff line change
@@ -1,186 +1 @@
1-
# As config was originally based on an example by Olivier Grisel. Thanks!
2-
# https://github.com/ogrisel/python-appveyor-demo/blob/master/appveyor.yml
3-
clone_depth: 50
41

5-
# No reason for us to restrict the number concurrent jobs
6-
max_jobs: 100
7-
8-
cache:
9-
- '%LOCALAPPDATA%\pip\Cache'
10-
11-
environment:
12-
global:
13-
MINGW_32: C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin
14-
MINGW_64: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin
15-
OPENBLAS_32: "https://3f23b170c54c2533c070-1c8a9b3114517dc5fe17b7c3f8c63a43.ssl.cf2.rackcdn.com/openblas-v0.3.7-win32-gcc_7_1_0.zip"
16-
OPENBLAS_64: "https://3f23b170c54c2533c070-1c8a9b3114517dc5fe17b7c3f8c63a43.ssl.cf2.rackcdn.com/openblas-v0.3.7-win_amd64-gcc_7_1_0.zip"
17-
18-
CYTHON_BUILD_DEP: Cython
19-
TEST_MODE: fast
20-
APPVEYOR_SAVE_CACHE_ON_ERROR: true
21-
APPVEYOR_SKIP_FINALIZE_ON_EXIT: true
22-
WHEELHOUSE_UPLOADER_USERNAME: travis-worker
23-
WHEELHOUSE_UPLOADER_SECRET:
24-
secure:
25-
9s0gdDGnNnTt7hvyNpn0/ZzOMGPdwPp2SewFTfGzYk7uI+rdAN9rFq2D1gAP4NQh
26-
BUILD_COMMIT: e94cec800304a6a467cf90ce4e7d3e207770b4b4
27-
DAILY_COMMIT: master
28-
29-
matrix:
30-
- PYTHON: C:\Python36
31-
PYTHON_VERSION: 3.6
32-
PYTHON_ARCH: 32
33-
34-
- PYTHON: C:\Python36-x64
35-
PYTHON_VERSION: 3.6
36-
PYTHON_ARCH: 64
37-
38-
- PYTHON: C:\Python37
39-
PYTHON_VERSION: 3.7
40-
PYTHON_ARCH: 32
41-
42-
- PYTHON: C:\Python37-x64
43-
PYTHON_VERSION: 3.7
44-
PYTHON_ARCH: 64
45-
46-
- PYTHON: C:\Python38
47-
PYTHON_VERSION: 3.8
48-
PYTHON_ARCH: 32
49-
50-
- PYTHON: C:\Python38-x64
51-
PYTHON_VERSION: 3.8
52-
PYTHON_ARCH: 64
53-
54-
55-
init:
56-
- "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%"
57-
- "ECHO \"%APPVEYOR_SCHEDULED_BUILD%\""
58-
- ps: >-
59-
if ($env:APPVEYOR_REPO_BRANCH -eq "master") {
60-
$env:CONTAINER = "pre-release"
61-
if ($env:DAILY_COMMIT) { $env:BUILD_COMMIT = $env:DAILY_COMMIT }
62-
$env:NPY_RELAXED_STRIDES_DEBUG = 1
63-
} else {
64-
$env:CONTAINER = "wheels"
65-
$env:UPLOAD_ARGS = "--no-update-index"
66-
}
67-
install:
68-
- cmd: echo "Filesystem root:"
69-
- dir C:\
70-
71-
- echo "Installed SDKs:"
72-
- dir "C:/Program Files/Microsoft SDKs/Windows"
73-
74-
# Get needed submodules
75-
- git submodule update --init
76-
77-
# Install new Python if necessary
78-
- ps: .\multibuild\install_python.ps1
79-
80-
# Prepend required Python to the PATH of this build (this cannot be
81-
# done from inside the powershell script as it would require to restart
82-
# the parent CMD process).
83-
- SET PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%
84-
85-
# Check that we have the expected version and architecture for Python
86-
- python --version
87-
- >-
88-
python -c "import sys,platform,struct;
89-
print(sys.platform, platform.machine(), struct.calcsize('P') * 8, )"
90-
91-
# Download and install static "openblas.a" to PYTHON\lib
92-
- ps: |
93-
$PYTHON_ARCH = $env:PYTHON_ARCH
94-
$PYTHON = $env:PYTHON
95-
If ($PYTHON_ARCH -eq 32) {
96-
$OPENBLAS = $env:OPENBLAS_32
97-
} Else {
98-
$OPENBLAS = $env:OPENBLAS_64
99-
}
100-
$clnt = new-object System.Net.WebClient
101-
$file = "$(New-TemporaryFile).zip"
102-
$tmpdir = New-TemporaryFile | %{ rm $_; mkdir $_ }
103-
$destination = "$PYTHON\lib\openblas.a"
104-
echo $file
105-
echo $tmpdir
106-
echo $OPENBLAS
107-
$clnt.DownloadFile($OPENBLAS,$file)
108-
Expand-Archive $file $tmpdir
109-
rm $tmpdir\$PYTHON_ARCH\lib\*.dll.a
110-
$lib = ls $tmpdir\$PYTHON_ARCH\lib\*.a | ForEach { ls $_ } | Select-Object -first 1
111-
echo $lib
112-
cp $lib $destination
113-
ls $destination
114-
115-
# Upgrade to the latest pip, setuptools, and wheel.
116-
- python -m pip install -U pip setuptools wheel
117-
118-
# Install build requirements.
119-
- pip install "%CYTHON_BUILD_DEP%" --install-option="--no-cython-compile"
120-
121-
build_script:
122-
- cd numpy
123-
- git checkout %BUILD_COMMIT%
124-
# Create _distributor_init.py
125-
- cd ..
126-
- python -c "import openblas_support; openblas_support.make_init('numpy/numpy')"
127-
- cd numpy
128-
# Append license text relevant for the built wheel
129-
- type ..\LICENSE_win32.txt >> LICENSE.txt
130-
- ps: |
131-
$PYTHON_ARCH = $env:PYTHON_ARCH
132-
If ($PYTHON_ARCH -eq 32) {
133-
$MINGW = $env:MINGW_32
134-
} Else {
135-
$MINGW = $env:MINGW_64
136-
}
137-
$env:Path += ";$MINGW"
138-
$env:NPY_NUM_BUILD_JOBS = "4"
139-
- python setup.py bdist_wheel
140-
- ps: |
141-
# Upload artifact to Appveyor immediately after build
142-
ls dist -r | Foreach-Object {
143-
appveyor PushArtifact $_.FullName
144-
pip install $_.FullName
145-
}
146-
147-
test_script:
148-
- pip install pytest
149-
- cd ..
150-
- python check_license.py
151-
- mkdir tmp_for_test
152-
- cd tmp_for_test
153-
- pytest --pyargs numpy
154-
- cd ..
155-
156-
after_test:
157-
# Upload test results to Appveyor
158-
- ps: |
159-
If (Test-Path .\junit-results.xml) {
160-
(new-object net.webclient).UploadFile(
161-
"https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)",
162-
(Resolve-Path .\junit-results.xml)
163-
)
164-
}
165-
$LastExitCode = 0
166-
# Remove old or huge cache files to hopefully not exceed the 1GB cache limit.
167-
#
168-
# If the cache limit is reached, the cache will not be updated (of not even
169-
# created in the first run). So this is a trade of between keeping the cache
170-
# current and having a cache at all.
171-
# NB: This is done only `on_success` since the cache in uploaded only on
172-
# success anyway.
173-
- C:\cygwin\bin\find "%LOCALAPPDATA%\pip" -type f -mtime +360 -delete
174-
- C:\cygwin\bin\find "%LOCALAPPDATA%\pip" -type f -size +10M -delete
175-
- C:\cygwin\bin\find "%LOCALAPPDATA%\pip" -empty -delete
176-
# Show size of cache
177-
- C:\cygwin\bin\du -hs "%LOCALAPPDATA%\pip\Cache"
178-
179-
on_success:
180-
# Upload the generated wheel package to Rackspace
181-
- cd numpy
182-
- pip install wheelhouse-uploader certifi
183-
- python -m wheelhouse_uploader upload
184-
--local-folder=dist
185-
%UPLOAD_ARGS%
186-
%CONTAINER%

.travis.yml

+36
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,42 @@ matrix:
6767
env:
6868
- MB_PYTHON_VERSION=3.8
6969
- MB_PYTHON_OSX_VER=10.9
70+
- os: linux
71+
arch: arm64
72+
env:
73+
- PLAT=aarch64
74+
- MB_ML_VER=2014
75+
- MB_PYTHON_VERSION=3.6
76+
- os: linux
77+
arch: s390x
78+
env:
79+
- PLAT=s390x
80+
- MB_ML_VER=2014
81+
- MB_PYTHON_VERSION=3.6
82+
- os: linux
83+
arch: ppc64le
84+
env:
85+
- PLAT=ppc64le
86+
- MB_ML_VER=2014
87+
- MB_PYTHON_VERSION=3.6
88+
- os: linux
89+
arch: arm64
90+
env:
91+
- PLAT=aarch64
92+
- MB_ML_VER=2014
93+
- MB_PYTHON_VERSION=3.7
94+
- os: linux
95+
arch: s390x
96+
env:
97+
- PLAT=s390x
98+
- MB_ML_VER=2014
99+
- MB_PYTHON_VERSION=3.7
100+
- os: linux
101+
arch: ppc64le
102+
env:
103+
- PLAT=ppc64le
104+
- MB_ML_VER=2014
105+
- MB_PYTHON_VERSION=3.7
70106

71107
before_install:
72108
- if [ "$TRAVIS_BRANCH" == "master" ]; then

README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ The wheel-building repository:
3030

3131
The resulting wheels are therefore self-contained and do not need any external
3232
dynamic libraries apart from those provided as standard by OSX / Linux as
33-
defined by the manylinux1 standard.
33+
defined by the manylinux standard.
3434

3535
The ``.travis.yml`` file in this repository has a line containing the API key
3636
for the Rackspace container encrypted with an RSA key that is unique to the

env_vars.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Environment variables for build
2-
OPENBLAS_VERSION="v0.3.7"
2+
OPENBLAS_VERSION="v0.3.5-605-gc815b8fb" # the 0.3.5 is misleading, this is 0.3.8dev
33
MACOSX_DEPLOYMENT_TARGET=10.9
4-
CFLAGS="-std=c99 -fno-strict-aliasing"
4+
# For verbosity: report where each command came from
5+
export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
6+
set -x

openblas_support.py

-42
This file was deleted.

0 commit comments

Comments
 (0)