2018-01-06 23:03:37 +00:00
|
|
|
language: python
|
2018-01-14 01:18:50 +00:00
|
|
|
virtualenv:
|
|
|
|
# We need this for PyGObject.
|
|
|
|
system_site_packages: true
|
2018-01-06 23:03:37 +00:00
|
|
|
matrix:
|
2018-01-14 01:18:50 +00:00
|
|
|
include:
|
|
|
|
# always lint on every commit
|
|
|
|
- python: 2.7
|
|
|
|
env: LINT=true
|
|
|
|
sudo: false
|
|
|
|
|
|
|
|
# only bother to build if we're going to deploy a release
|
|
|
|
- python: 2.7
|
|
|
|
sudo: required
|
|
|
|
env: BUILD=true
|
|
|
|
if: tag is present
|
|
|
|
cache: pip
|
2018-01-06 23:03:37 +00:00
|
|
|
install:
|
2018-01-14 01:18:50 +00:00
|
|
|
- |
|
|
|
|
if [ -n "$BUILD" ]; then
|
|
|
|
# For some bizarre reason, this build has been failing due to the
|
|
|
|
# key for the mongodb repo expiring. Maybe Travis includes the
|
|
|
|
# mongodb repo by default...?
|
|
|
|
sudo rm /etc/apt/sources.list.d/mongodb*.list
|
|
|
|
|
|
|
|
# Need inkscape >=0.92 for inkex.py and friends
|
|
|
|
sudo add-apt-repository --yes ppa:inkscape.dev/stable
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install inkscape
|
|
|
|
|
|
|
|
# for shapely
|
|
|
|
sudo apt-get install libgeos-dev
|
|
|
|
|
|
|
|
# for wxPython
|
|
|
|
sudo apt-get install glib-networking
|
|
|
|
|
|
|
|
# This is the same as the pypi module PyGObject. We can't just do
|
|
|
|
# "pip install PyGObject" because it depends on a version of
|
|
|
|
# libgirepository1.0-dev that doesn't exist in Trusty.
|
|
|
|
sudo apt-get install python-gi python-gi-cairo libgirepository1.0-dev
|
|
|
|
|
|
|
|
# wxPython doen't publish linux wheels in pypi
|
|
|
|
wget https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-14.04/wxPython-4.0.0b2-cp27-cp27mu-linux_x86_64.whl
|
|
|
|
pip install wxPython-4.0.0b2-cp27-cp27mu-linux_x86_64.whl
|
|
|
|
|
|
|
|
# We can't use the shapely wheel because it includes the geos
|
|
|
|
# library but with a weird file name. Details:
|
|
|
|
# https://github.com/pyinstaller/pyinstaller/blob/61b1c75c2b0469b32d114298a63bf60b8d597e37/PyInstaller/hooks/hook-shapely.py#L34
|
|
|
|
pip install --no-binary shapely -r requirements.txt
|
|
|
|
|
|
|
|
pip install pyinstaller
|
|
|
|
else
|
|
|
|
pip install flake8
|
|
|
|
fi
|
2018-01-06 23:03:37 +00:00
|
|
|
before_script:
|
2018-01-14 01:18:50 +00:00
|
|
|
- "echo LINT: $LINT BUILD: $BUILD"
|
2018-01-06 23:03:37 +00:00
|
|
|
script:
|
2018-01-14 01:18:50 +00:00
|
|
|
- |
|
|
|
|
if [ -n "$LINT" ]; then
|
|
|
|
flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
|
|
|
|
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
|
|
|
elif [ -n "$BUILD" ]; then
|
|
|
|
make dist
|
|
|
|
else
|
|
|
|
true
|
|
|
|
fi
|
2018-01-06 23:03:37 +00:00
|
|
|
notifications:
|
2018-01-14 01:18:50 +00:00
|
|
|
on_success: never
|
|
|
|
on_failure: never
|
|
|
|
deploy:
|
|
|
|
- provider: releases
|
|
|
|
api_key:
|
|
|
|
secure: pYORXHcn0hPcMIo6+brVE+wYce272H4COp1iXmPvBUz64MAX0Bdm5UX6cTAvzwNd9Hhi2nnWebaoS5AiPelbZgQoZJXsy4whrp7+ZrkQZkhGcqsSqXN6j5k5xdGeFX4k37T7eGkFyajTAdIWB3locHcikKN6N6PnyCPxGD/xuxiD1fJSVKGqBOptBYsqFtMddKy3aT0nmRG/2pMElq2Fcxozo+rR00j2/3npVoh2VTRt2L0S/DrX3zKT4vi2+AQ1MmKEAfF/YxCPybJGPe+wHz4egs0+PIJYb7pSZL8Ja81IS4v5cmmy/r2la815amyRyXwZXbJwBX8h9wPa7dwGStMvJdUidlqaXjKMsWba3QbD6YHOi0+UOFvWeubCDqXKhqxVAvZyCvXCx2WPlBfGWsJDHK/j2pU5Iul5Jz2Zsa3PLYA3UeGWVy081SZNuklNdccKGTokntFnR3pGM/jDN/JK7RkvuPM5qQqn3gludQnrdo/Kw0I77hAEDasgUyO8cweSfyqOXBN0dkbLjfBVRslRRRuC5fV9MIqFvLclaPfMlxsSTdDO4MGJRsF7VvFySBdh0xK7Rm+Vb9jYjCR3FV+b8TRsnY0eD2eFM+rmQt/OYdNIs6emVrTXCcAIzq4JoKZdFDIDDRsiztGSjIBB0+rSXmiUMtCiUo5GS/7zxGs=
|
|
|
|
file:
|
|
|
|
- '*.tar.gz'
|
|
|
|
file_glob: true
|
|
|
|
skip_cleanup: true
|
|
|
|
on:
|
2018-01-14 02:04:41 +00:00
|
|
|
tags: true
|
|
|
|
all_branches: true
|
|
|
|
condition: '$TRAVIS_TAG =~ ^v[0-9.]+$'
|
2018-01-14 01:18:50 +00:00
|
|
|
- provider: releases
|
|
|
|
api_key:
|
|
|
|
secure: pYORXHcn0hPcMIo6+brVE+wYce272H4COp1iXmPvBUz64MAX0Bdm5UX6cTAvzwNd9Hhi2nnWebaoS5AiPelbZgQoZJXsy4whrp7+ZrkQZkhGcqsSqXN6j5k5xdGeFX4k37T7eGkFyajTAdIWB3locHcikKN6N6PnyCPxGD/xuxiD1fJSVKGqBOptBYsqFtMddKy3aT0nmRG/2pMElq2Fcxozo+rR00j2/3npVoh2VTRt2L0S/DrX3zKT4vi2+AQ1MmKEAfF/YxCPybJGPe+wHz4egs0+PIJYb7pSZL8Ja81IS4v5cmmy/r2la815amyRyXwZXbJwBX8h9wPa7dwGStMvJdUidlqaXjKMsWba3QbD6YHOi0+UOFvWeubCDqXKhqxVAvZyCvXCx2WPlBfGWsJDHK/j2pU5Iul5Jz2Zsa3PLYA3UeGWVy081SZNuklNdccKGTokntFnR3pGM/jDN/JK7RkvuPM5qQqn3gludQnrdo/Kw0I77hAEDasgUyO8cweSfyqOXBN0dkbLjfBVRslRRRuC5fV9MIqFvLclaPfMlxsSTdDO4MGJRsF7VvFySBdh0xK7Rm+Vb9jYjCR3FV+b8TRsnY0eD2eFM+rmQt/OYdNIs6emVrTXCcAIzq4JoKZdFDIDDRsiztGSjIBB0+rSXmiUMtCiUo5GS/7zxGs=
|
|
|
|
file:
|
|
|
|
- '*.tar.gz'
|
|
|
|
file_glob: true
|
|
|
|
skip_cleanup: true
|
|
|
|
prerelease: true
|
|
|
|
name: "development build $TRAVIS_TAG"
|
|
|
|
on:
|
2018-01-14 02:04:41 +00:00
|
|
|
tags: true
|
2018-01-14 01:18:50 +00:00
|
|
|
all_branches: true
|
2018-01-14 02:04:41 +00:00
|
|
|
condition: '! ("$TRAVIS_TAG" =~ ^v[0-9.]+$)'
|