Skip to content
This repository was archived by the owner on Feb 15, 2023. It is now read-only.

Commit 093e1df

Browse files
committed
Merge branch 'tmp'
* tmp: Fix up tests and wheel dependencies Fix numpy related build error and test config Update to multibuild
2 parents 276f008 + f0809f5 commit 093e1df

File tree

6 files changed

+132
-61
lines changed

6 files changed

+132
-61
lines changed

.gitmodules

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
[submodule "terryfy"]
2-
path = terryfy
3-
url = git://github.com/MacPython/terryfy.git
41
[submodule "numpy"]
52
path = numpy
63
url = git://github.com/numpy/numpy.git
74
[submodule "scipy"]
85
path = scipy
96
url = git://github.com/scipy/scipy.git
7+
[submodule "multibuild"]
8+
path = multibuild
9+
url = https://github.com/matthew-brett/multibuild.git

.travis.yml

+96-56
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,99 @@
1-
language:
2-
- objective-c
31
env:
4-
global:
5-
- BUILD_COMMIT="latest-tag" # comment out to build version in submodule
6-
- REPO_DIR=scipy
7-
matrix:
8-
# need numpy at least 1.6.2 to avoid '-faltivec' flag from np.distutils
9-
- VERSION=2.7.10 NUMPY_VERSION=1.6.2
10-
- VERSION=3.3.5 NUMPY_VERSION=1.7.1
11-
- VERSION=3.4.3 NUMPY_VERSION=1.7.1
12-
- VERSION=3.5.0 NUMPY_VERSION=1.7.1
2+
global:
3+
- REPO_DIR=scipy
4+
- BUILD_COMMIT=v0.17.1
5+
- PLAT=x86_64
6+
- NP_BUILD_DEP="numpy==1.7.1"
7+
- NP_TEST_DEP="numpy==1.7.1"
8+
- UNICODE_WIDTH=32
9+
- MANYLINUX_URL=https://nipy.bic.berkeley.edu/manylinux
10+
- WHEELHOUSE_UPLOADER_USERNAME=travis-worker
11+
# Following generated with
12+
# travis encrypt -r MacPython/scipy-wheels WHEELHOUSE_UPLOADER_SECRET=<the api key>
13+
- secure:
14+
"fne+dO/N+Zv8pusPVO6S58p7lFWLDIwjXwf/IgBPxGSdDFEQVY8xl0+nGPNNzYZfmX/inBrb/3+8el9sggC+X7KG6mGmCtcpwems2sWn6XY5OQ+kWl8SEdDs2SiAsrieqbC3d1cmMoHyddX/YdGWVSdIji70nRER0j9wjNwYNlE="
15+
16+
language: python
17+
sudo: required
18+
dist: trusty
19+
services: docker
20+
21+
matrix:
22+
include:
23+
- os: linux
24+
python: 2.7
25+
- os: linux
26+
python: 2.7
27+
env:
28+
- UNICODE_WIDTH=16
29+
- os: linux
30+
python: 2.7
31+
env:
32+
- PLAT=i686
33+
- os: linux
34+
python: 2.7
35+
env:
36+
- PLAT=i686
37+
- UNICODE_WIDTH=16
38+
- os: linux
39+
python: 3.4
40+
env:
41+
# Python 3.4 needs more recent numpy (for testing only)
42+
- NP_TEST_DEP=numpy==1.9.3
43+
- os: linux
44+
python: 3.4
45+
env:
46+
- PLAT=i686
47+
- NP_TEST_DEP=numpy==1.9.3
48+
- os: linux
49+
python: 3.5
50+
env:
51+
- NP_BUILD_DEP=numpy==1.9.3
52+
- NP_TEST_DEP=numpy==1.9.3
53+
- os: linux
54+
python: 3.5
55+
env:
56+
- PLAT=i686
57+
- NP_BUILD_DEP=numpy==1.9.3
58+
- NP_TEST_DEP=numpy==1.9.3
59+
- os: osx
60+
language: objective-c
61+
env:
62+
- TRAVIS_PYTHON_VERSION=2.7
63+
- os: osx
64+
language: objective-c
65+
env:
66+
- TRAVIS_PYTHON_VERSION=3.4
67+
- NP_TEST_DEP=numpy==1.9.3
68+
- os: osx
69+
language: objective-c
70+
env:
71+
- TRAVIS_PYTHON_VERSION=3.5
72+
# OSX build of scipy on Python 3.5 needs built 1.8.2 wheel to avoid
73+
# https://github.com/numpy/numpy/issues/6204. numpy 1.8.2 wheel for
74+
# Python 3.5 at nipy manylinux URL.
75+
- NP_BUILD_DEP=numpy==1.8.2
76+
- NP_TEST_DEP=numpy==1.9.3
77+
78+
before_install:
79+
- BUILD_DEPENDS="$NP_BUILD_DEP Cython"
80+
- TEST_DEPENDS="$NP_TEST_DEP nose"
81+
- source multibuild/common_utils.sh
82+
- source multibuild/travis_steps.sh
83+
- before_install
84+
1385
install:
14-
# Install dual arch gfortran
15-
- sudo installer -pkg archives/gfortran-4.2.3.pkg -target /
16-
- source terryfy/travis_tools.sh
17-
- get_python_environment macpython $VERSION venv
18-
- pip install delocate
19-
# Update to latest pip and wheel package for Python 3.5
20-
- pip install -U pip wheel
21-
# Install patched wheel for Python 3.5
22-
- pip install -f $NIPY_WHEELHOUSE numpy==$NUMPY_VERSION
23-
- pip install cython
24-
- if [ -n "$BUILD_COMMIT" ]; then
25-
checkout_commit $REPO_DIR $BUILD_COMMIT;
26-
fi
27-
- cd $REPO_DIR
28-
- export CC=clang
29-
- export CXX=clang++
30-
- python setup.py bdist_wheel
31-
- delocate-listdeps dist/*.whl # lists library dependencies
32-
- delocate-wheel dist/*.whl # copies library dependencies into wheel
33-
- delocate-addplat --rm-orig -x 10_9 -x 10_10 dist/*.whl
34-
- pip install dist/*.whl
35-
- cd ..
86+
# Maybe get and clean and patch source
87+
- clean_code $REPO_DIR $BUILD_COMMIT
88+
- build_wheel $REPO_DIR $PLAT
89+
3690
script:
37-
- pip install nose
38-
# Python 3.4 needs more recent numpy (for testing only)
39-
- if [ -n "$(pyver_ge $VERSION 3.4.0)" ]; then
40-
pip install numpy==1.9.2;
41-
fi
42-
- mkdir tmp_test_dir
43-
- cd tmp_test_dir
44-
- python -c "import sys; import scipy; sys.exit(not scipy.test().wasSuccessful())"
45-
- arch -i386 python -c "import sys; import scipy; sys.exit(not scipy.test().wasSuccessful())"
46-
- cd ..
47-
- unset CC CXX # reset to default compilation for deploy modules
48-
before_deploy:
49-
- cd $REPO_DIR/dist
50-
# Fix for https://github.com/travis-ci/travis-ci/issues/4635
51-
- rvm 1.9.3 do gem install net-ssh -v 2.9.2
52-
deploy:
53-
provider: cloudfiles
54-
username: travis-worker
55-
api_key:
56-
secure: "TSOBqCoQFnIjFb98ItonBT1ubfBo/pYsS7A69Q6lUAjl7Mun+F+XE4GgP0QxtiyFRBUsYZUQYsoqKoro3z/qKFUBfpBuFlPEPhtbRmoQAGSSKFtXBI9XxwJAiGL6CX/z22fCNOWWaWel4X6WacEb+ygoI+Hg21WFQT7djEFNctE="
57-
region: ORD
58-
container: wheels
59-
skip_cleanup: true
91+
- install_run $PLAT
92+
93+
after_success:
94+
# Upload wheels to Rackspace container
95+
- pip install wheelhouse-uploader
96+
- python -m wheelhouse_uploader upload --local-folder
97+
${TRAVIS_BUILD_DIR}/wheelhouse/
98+
--no-update-index
99+
wheels

config.sh

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Define custom utilities
2+
# Test for OSX with [ -n "$IS_OSX" ]
3+
4+
function pre_build {
5+
# Any stuff that you need to do before you start building the wheels
6+
# Runs in the root directory of this repository.
7+
if [ -n "$IS_OSX" ]; then
8+
sudo installer -pkg archives/gfortran-4.2.3.pkg -target /
9+
else
10+
build_openblas
11+
# Force scipy to use OpenBLAS regardless of what numpy uses
12+
cat << EOF > $HOME/site.cfg
13+
[openblas]
14+
library_dirs = /usr/local/lib
15+
include_dirs = /usr/local/include
16+
EOF
17+
fi
18+
}
19+
20+
function run_tests {
21+
# Runs tests on installed distribution from an empty directory
22+
test_cmd="import sys; import scipy; sys.exit(not scipy.test('full').wasSuccessful())"
23+
if [ -n "$IS_OSX" ]; then # Test both architectures on OSX
24+
arch -i386 python -c "$test_cmd"
25+
arch -x86_64 python -c "$test_cmd"
26+
else # Not OSX
27+
python -c "$test_cmd"
28+
fi
29+
# Show BLAS / LAPACK used
30+
python -c 'import scipy; scipy.show_config()'
31+
}

multibuild

Submodule multibuild added at 5b75f0d

scipy

Submodule scipy updated 1149 files

terryfy

-1
This file was deleted.

0 commit comments

Comments
 (0)