Commit 5577d1c7 authored by Jay's avatar Jay Committed by jay
Browse files

Try the binstar install of opencv3 to avoid compilation.

parent 38e94f85
Loading
Loading
Loading
Loading
+2 −37
Original line number Original line Diff line number Diff line
language: python
language: python
sudo: true
sudo: false


branches:
branches:
only:
only:
@@ -33,47 +33,12 @@ install:
  - source activate test-env
  - source activate test-env


  # Install the non-conda packages if required, requirements.txt duplicates are ignored
  # Install the non-conda packages if required, requirements.txt duplicates are ignored
  - conda install -c conda install -c https://conda.binstar.org/menpo opencv3
  - conda install -c osgeo proj4
  - conda install -c osgeo proj4
  - pip install -r requirements.txt
  - pip install -r requirements.txt
  - pip install coverage
  - pip install coverage
  - pip install coveralls
  - pip install coveralls


  # Now get OpenCV3 installed
  - sudo apt-get install -y build-essential
  - sudo apt-get install -y cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
  - sudo apt-get install -y python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev

  #Grab the source
  - curl -sL http://github.com/Itseez/opencv/archive/3.0.0.zip > opencv.zip
  - curl -sL http://github.com/Itseez/opencv_contrib/archive/3.0.0.zip > opencv_contrib.zip
  - unzip opencv_contrib.zip
  - unzip opencv.zip
  - cd opencv-3.0.0

  # Create a new 'build' folder.
  - mkdir build
  - cd build

  # Set build instructions for Ubuntu distro.
  - cmake -D CMAKE_BUILD_TYPE=RELEASE -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules -D CMAKE_INSTALL_PREFIX=$(python -c "import sys; print(sys.prefix)") -D PYTHON_EXECUTABLE=$(which python ) ..

  # Run 'make' with the 1.5 threads Travis makes available
  - make -j2

  # Install to OS.
  - sudo make install

  # Add configuration to OpenCV to tell it where the library files are located on the file system (/usr/local/lib)
  - sudo sh -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf'

  - sudo ldconfig
  - echo "OpenCV installed."

  # Return to the root
  - cd ../../

  # Might need to link the cv2.so into the env?

script:
script:
  - nosetests --with-coverage --cover-package=autocnet
  - nosetests --with-coverage --cover-package=autocnet