@@ -39,20 +39,36 @@ base_url=http://cache27diy-cpycloud.rhcloud.com
3939wheel_box=${TRAVIS_PYTHON_VERSION}${JOB_TAG}
4040PIP_ARGS+=" -I --use-wheel --find-links=$base_url /$wheel_box / --allow-external --allow-insecure"
4141
42- # Force virtualenv to accept system_site_packages
43- rm -f $VIRTUAL_ENV /lib/python$TRAVIS_PYTHON_VERSION /no-global-site-packages.txt
44-
45-
4642if [ -n " $LOCALE_OVERRIDE " ]; then
4743 # make sure the locale is available
4844 # probably useless, since you would need to relogin
4945 time sudo locale-gen " $LOCALE_OVERRIDE "
5046fi
5147
52-
5348# we need these for numpy
5449time sudo apt-get $APT_ARGS install libatlas-base-dev gfortran
5550
51+ if [ -n " $NUMPY_BUILD " ]; then
52+ # building numpy
53+ curdir=$( pwd)
54+ echo " building numpy: $curdir "
55+
56+ # remove the system installed numpy
57+ pip uninstall numpy -y
58+
59+ # clone & install
60+ git clone --branch master https://github.com/numpy/numpy.git numpy
61+ cd numpy
62+ time sudo python setup.py install
63+
64+ cd $curdir
65+ numpy_version=$( python -c ' import numpy; print(numpy.__version__)' )
66+ echo " numpy: $numpy_version "
67+ else
68+ # Force virtualenv to accept system_site_packages
69+ rm -f $VIRTUAL_ENV /lib/python$TRAVIS_PYTHON_VERSION /no-global-site-packages.txt
70+ fi
71+
5672time pip install $PIP_ARGS -r ci/requirements-${wheel_box} .txt
5773
5874
@@ -98,6 +114,10 @@ export PATH=/usr/lib/ccache:/usr/lib64/ccache:$PATH
98114which gcc
99115ccache -z
100116time pip install $( find dist | grep gz | head -n 1)
101- # restore cython
102- time pip install $PIP_ARGS $( cat ci/requirements-${wheel_box} .txt | grep -i cython)
117+
118+ # restore cython (if not numpy building)
119+ if [ -z " $NUMPY_BUILD " ]; then
120+ time pip install $PIP_ARGS $( cat ci/requirements-${wheel_box} .txt | grep -i cython)
121+ fi
122+
103123true
0 commit comments