libais
libais copied to clipboard
Can't `pip install libais` on vanilla Travis-CI
I'm trying to build and test a library that requires libais, but when I pip install libais
in my .travis.yml
I get:
cc1plus: error: unrecognized command line option ‘-std=c++11’
I got around this by installing libais before installing my own package:
language: python
python:
- 2.7
- 3.4
before_install:
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get update -qq
install:
- sudo apt-get install -qq gcc-4.8 g++-4.8
- CC=g++-4.8 pip install libais
- pip install -e .\[dev\]
script:
- py.test tests --cov benthosp --cov-report term-missing
Need to have C++11 support when building. As @geowurster said, building wheels would prevent people from having to build when testing.
@schwehr I don't know much about wheels, but I think platter is supposed to make this easier.
We can also push a set of wheels to a special Travis tag on GitHub so people can test against those if they want, the idea being that everything is already compiled for Travis, so why not just preserve that package. There are, of course, pros and cons to always testing external packages against master.
The snippet below is how I got around the issue. Currently I'm always doing pip install libais
before installing the main package.
before_install:
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get update -qq
install:
- sudo apt-get install -qq gcc-4.8 g++-4.8
- CC=g++-4.8 pip install libais
- pip install -e .\[dev\]
@geowurster https://github.com/schwehr/libais/pull/115 definitely improves things. I still need to look at wheels.
@schwehr I have done a bit of research but haven't packaged a compiled module. Will give it a shot if I run across the right info.