diff --git a/.travis.yml b/.travis.yml index 5b215f0..bfdf0d7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,81 +25,6 @@ matrix: # Exclude the default Python 3.5 build - python: 3.5 include: - - os: linux - env: - - MB_PYTHON_VERSION=2.7 - - os: linux - env: - - MB_PYTHON_VERSION=2.7 - - UNICODE_WIDTH=16 - - os: linux - env: - - MB_PYTHON_VERSION=2.7 - - PLAT=i686 - - os: linux - env: - - MB_PYTHON_VERSION=2.7 - - PLAT=i686 - - UNICODE_WIDTH=16 - - os: linux - env: - - MB_PYTHON_VERSION=3.6 - - os: linux - env: - - MB_PYTHON_VERSION=3.6 - - PLAT=i686 - - os: linux - env: - - MB_PYTHON_VERSION=3.7 - - NP_BUILD_DEP="numpy==1.15" - - NP_TEST_DEP="numpy==1.15" - - os: linux - env: - - MB_PYTHON_VERSION=3.7 - - NP_BUILD_DEP="numpy==1.15" - - NP_TEST_DEP="numpy==1.15" - - PLAT=i686 - - os: linux - env: - - MB_PYTHON_VERSION=3.8 - - NP_BUILD_DEP="numpy==1.18" - - NP_TEST_DEP="numpy==1.18" - - os: linux - env: - - MB_PYTHON_VERSION=3.8 - - NP_BUILD_DEP="numpy==1.18" - - NP_TEST_DEP="numpy==1.18" - - PLAT=i686 - - os: linux - env: - - MB_PYTHON_VERSION=3.9 - - NP_BUILD_DEP="numpy==1.20" - - NP_TEST_DEP="numpy==1.20" - - os: linux - env: - - MB_PYTHON_VERSION=3.9 - - NP_BUILD_DEP="numpy==1.20" - - NP_TEST_DEP="numpy==1.20" - - PLAT=i686 - - os: osx - language: generic - env: MB_PYTHON_VERSION=2.7 - - os: osx - language: generic - env: - - MB_PYTHON_VERSION=3.6 - - os: osx - language: generic - env: - - MB_PYTHON_VERSION=3.7 - - NP_BUILD_DEP="numpy==1.15" - - NP_TEST_DEP="numpy==1.15" - - os: osx - language: generic - env: - - MB_PYTHON_VERSION=3.8 - - NP_BUILD_DEP="numpy==1.18" - - NP_TEST_DEP="numpy==1.18" - os: osx language: generic env: diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 75a0131..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,97 +0,0 @@ -# vim ft=yaml -# CI on Windows via appveyor - -environment: - global: - BUILD_COMMIT: master - NP_BUILD_DEP: "numpy==1.14" - NP_TEST_DEP: "numpy==1.14" - SP_DEP: "scipy" - ANACONDA_ORG: "nipy" - EXTRA_FLAGS: "" - ANACONDA_SECRET: - secure: Ds0PkQD0b/QOfoNoiPuFJb01zg0Mq0dkAxIG2jRXocCAereSXdWw6XYaDrutHWme - - matrix: - - PYTHON: C:\Python27 - - PYTHON: C:\Python27-x64 - # Doctest fail from the Ls as in (1L, 2L) != (1, 2) - EXTRA_FLAGS: "--without-doctest" - - PYTHON: C:\Python36 - - PYTHON: C:\Python36-x64 - - PYTHON: C:\Python37 - NP_BUILD_DEP: "numpy==1.15" - NP_TEST_DEP: "numpy==1.15" - - PYTHON: C:\Python37-x64 - NP_BUILD_DEP: "numpy==1.15" - NP_TEST_DEP: "numpy==1.15" - - PYTHON: C:\Python38 - # https://stackoverflow.com/a/58582651/1939576 - EXTRA_FLAGS: "--traverse-namespace" - NP_BUILD_DEP: "numpy==1.18" - NP_TEST_DEP: "numpy==1.18" - - PYTHON: C:\Python38-x64 - EXTRA_FLAGS: "--traverse-namespace" - NP_BUILD_DEP: "numpy==1.18" - NP_TEST_DEP: "numpy==1.18" - - PYTHON: C:\Python39 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - EXTRA_FLAGS: "--traverse-namespace" - NP_BUILD_DEP: "numpy==1.20" - NP_TEST_DEP: "numpy==1.20" - - PYTHON: C:\Python39-x64 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - EXTRA_FLAGS: "--traverse-namespace" - NP_BUILD_DEP: "numpy==1.20" - NP_TEST_DEP: "numpy==1.20" - -install: - # Prepend newly installed Python to the PATH of this build (this cannot be - # done from inside the powershell script as it would require to restart - # the parent CMD process). - - SET PATH=%PYTHON%;%PYTHON%\Scripts;%PATH% - - python -m pip install -U pip setuptools - - # Fix MSVC builds for 64-bit Python. See: - # http://stackoverflow.com/questions/32091593/cannot-install-windows-sdk-7-1-on-windows-10 - - echo "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 > "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64/vcvars64.bat" - - # Install the dependencies of the project. - - pip install %NP_BUILD_DEP% Cython nose nibabel sympy scipy - # Pin wheel to 0.26 to avoid Windows ABI tag for built wheel - - pip install wheel==0.26 - # Build wheel - - cd nipy - - git submodule update --init - - git checkout %BUILD_COMMIT% - - python setup.py bdist_wheel - - cd .. - -build: false # Not a C# project, build stuff at the test step instead. - -test_script: - - pip install %NP_TEST_DEP% - - pip install --pre --no-index --find-links .\nipy\dist nipy - # Change into an innocuous directory and find tests from installation - - mkdir for_testing - - cd for_testing - - python --version - - python ..\nipy\tools\nipnost %EXTRA_FLAGS% nipy - - cd .. - -artifacts: - # Archive the generated wheel package in the ci.appveyor.com build report. - - path: nipy\dist\* - -on_success: - # Upload the generated wheel package to Anaconda.org - - pip install git+https://github.com/Anaconda-Platform/anaconda-project - - pip install git+https://github.com/Anaconda-Platform/anaconda-client - - anaconda -t %ANACONDA_SECRET% upload --force -u %ANACONDA_ORG% nipy\dist\*.whl - -cache: - # Use the appveyor cache to avoid re-downloading large archives such - # the MKL numpy and scipy wheels mirrored on a rackspace cloud - # container, speed up the appveyor jobs and reduce bandwidth - # usage on our rackspace account. - - '%APPDATA%\pip\Cache' diff --git a/config.sh b/config.sh index 38956ba..97f2658 100644 --- a/config.sh +++ b/config.sh @@ -5,10 +5,19 @@ function pre_build { # Any stuff that you need to do before you start # building the wheels. # Runs in the root directory of this repository. - # Accelerate error only on macOS + # Workaround for Accelerate error; only on macOS. if [ -z "$IS_MACOS" ]; then return; fi - # Only for Numpy >= 1.20 - local np_ver=$(python -c 'import numpy; print(numpy.__version__)') + # We need NP_BUILD_DEP to know which Numpy we will + # get - so this variable must be defined here. + # It will be for macOS builds that see the env vars + # from the travis config. + if [ -z "$NP_BUILD_DEP" ]; then return; fi + local np_ver=$(echo $NP_BUILD_DEP | sed -E 's/^numpy[=<>! ]+([0-9.]+)/\1/') + if ! [[ $np_ver =~ ^[0-9.]+$ ]]; then + echo "Could not parse NP_BUILD_DEP=$NP_BUILD_DEP" + exit 1 + fi + # Problem only arises for Numpy >= 1.20 if [ $(lex_ver $np_ver) -lt $(lex_ver 1.20) ]; then return fi diff --git a/site.cfg.openblas b/site.cfg.openblas index 84793a8..932a434 100644 --- a/site.cfg.openblas +++ b/site.cfg.openblas @@ -1,5 +1,5 @@ [openblas] libraries = openblas -library_dirs = /usr/local/lib -include_dirs = /usr/local/include -runtime_library_dirs = /usr/local/lib +library_dirs = /usr/local/opt/openblas/lib +include_dirs = /usr/local/opt/openblas/include +runtime_library_dirs = /usr/local/opt/opeblas/lib