diff --git a/.conda/bin/build b/.conda/bin/build index b96392864..4171700db 100755 --- a/.conda/bin/build +++ b/.conda/bin/build @@ -21,4 +21,12 @@ then CONDA_HOME="$HOME"/miniconda3 fi -"$CONDA_HOME"/bin/conda build --python=$python_version "$DIR"/.. +if [ $(which xcrun) ] +then + sdk_path=$(xcrun --show-sdk-path) + variants_prefix="--variants" + variants="{'CONDA_BUILD_SYSROOT': ['${sdk_path}']}" +fi + +"$CONDA_HOME"/bin/conda build --python=$python_version \ + "$variants_prefix" "$variants" "$DIR"/.. diff --git a/.conda/bin/jenkins-server-customization b/.conda/bin/jenkins-server-customization index d3e3cb223..fc5250d57 100644 --- a/.conda/bin/jenkins-server-customization +++ b/.conda/bin/jenkins-server-customization @@ -1,5 +1,5 @@ # This Bash script must be sourced, not executed # Customizations required for the server that currently runs Jenkins -conda install --yes mpi4py tensorflow +conda install --yes mpi4py tensorflow scipy\<1.3 module unload gcc diff --git a/.conda/build.sh b/.conda/build.sh index 3f1175f91..c2a562cbf 100755 --- a/.conda/build.sh +++ b/.conda/build.sh @@ -1,13 +1,5 @@ #!/bin/bash -if [[ "$OSTYPE" == "darwin"* ]]; then - export MACOSX_DEPLOYMENT_TARGET=10.9 - export CC=$(which clang) - export CXX=$(which clang++) -fi - -echo $PREFIX - # Install pymanopt via pip because there isn't a conda package PIP_NO_INDEX=False $PYTHON -m pip install pymanopt diff --git a/.travis.yml b/.travis.yml index 4c7b6d7bd..ccfafee97 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,3 @@ -branches: - only: - - master - matrix: include: - os: linux @@ -41,7 +37,6 @@ matrix: script: ./.conda/bin/build - os: osx - osx_image: xcode8 install: ./.conda/bin/install-miniconda script: ./.conda/bin/build diff --git a/setup.py b/setup.py index 3b6f1120a..a84083170 100644 --- a/setup.py +++ b/setup.py @@ -82,7 +82,7 @@ class BuildExt(build_ext): c_opts['unix'] += ['-lirc', '-lintlc'] if sys.platform == 'darwin': - c_opts['unix'] += ['-stdlib=libc++', '-mmacosx-version-min=10.7', + c_opts['unix'] += ['-stdlib=libc++', '-mmacosx-version-min=10.9', '-ftemplate-depth-1024'] def build_extensions(self): @@ -126,7 +126,8 @@ def finalize_options(self): # https://travis-ci.org/brainiak/brainiak/jobs/545838666 'mpi4py>=3', 'nitime', - 'numpy', + # https://github.com/numpy/numpy/issues/14189 + 'numpy<1.17', 'scikit-learn[alldeps]>=0.18', # See https://github.com/scipy/scipy/pull/8082 # and https://github.com/pymanopt/pymanopt/issues/77 diff --git a/tests/eventseg/test_event.py b/tests/eventseg/test_event.py index a82de27bd..56106014b 100644 --- a/tests/eventseg/test_event.py +++ b/tests/eventseg/test_event.py @@ -33,10 +33,13 @@ def test_fit_shapes(): "Segmentation from find_events not correctly normalized" es_invalid = EventSegment(K) - with pytest.raises(ValueError, message="T < K should cause error"): + with pytest.raises(ValueError): es_invalid.model_prior(K-1) - with pytest.raises(ValueError, message="#Events < K should cause error"): + # ``with`` block is about to end with no error. + pytest.fail("T < K should cause error") + with pytest.raises(ValueError): es_invalid.set_event_patterns(np.zeros((V, K-1))) + pytest.fail("#Events < K should cause error") def test_simple_boundary(): @@ -60,11 +63,13 @@ def test_event_transfer(): es = EventSegment(2) sample_data = np.asarray([[1, 1, 1, 0, 0, 0, 0], [0, 0, 0, 1, 1, 1, 1]]) - with pytest.raises(NotFittedError, message="Should need to set variance"): + with pytest.raises(NotFittedError): seg = es.find_events(sample_data.T)[0] + pytest.fail("Should need to set variance") - with pytest.raises(NotFittedError, message="Should need to set patterns"): + with pytest.raises(NotFittedError): seg = es.find_events(sample_data.T, np.asarray([1, 1]))[0] + pytest.fail("Should need to set patterns") es.set_event_patterns(np.asarray([[1, 0], [0, 1]])) seg = es.find_events(sample_data.T, np.asarray([1, 1]))[0]