diff options
author | Simon McVittie <smcv@collabora.com> | 2018-05-03 13:14:37 +0100 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2018-05-03 14:25:25 +0100 |
commit | 8c01125643e5ff94c9baa898dd61add8d4739680 (patch) | |
tree | 516da1cd6c0a06477f2f974e8b536d62b091ed2c | |
parent | 25923e84c44965c5ebdac0567133d5a88885015e (diff) |
Travis-CI: Use system Python to run pip for system Python
Signed-off-by: Simon McVittie <smcv@collabora.com>
-rw-r--r-- | .travis.yml | 32 | ||||
-rwxr-xr-x | tools/travis-ci-setup.sh | 53 |
2 files changed, 54 insertions, 31 deletions
diff --git a/.travis.yml b/.travis.yml index e39651d..fce7573 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,38 +28,8 @@ cache: directories: - $HOME/.ccache install: - - 'sudo apt-get -qq -y update' - - > - sudo apt-get -qq -y install - autoconf - automake - ccache - dbus - gnome-desktop-testing - libdbus-1-dev - libtool - - > - test -z "$dbus_ci_system_python" || sudo apt-get -qq -y install - ${dbus_ci_system_python} - ${dbus_ci_system_python%-dbg}-docutils - ${dbus_ci_system_python%-dbg}-gi - ${dbus_ci_system_python%-dbg}-setuptools - - > - test "${dbus_ci_system_python%-dbg}" = "${dbus_ci_system_python}" || - sudo apt-get -qq -y install - ${dbus_ci_system_python%-dbg}-gi-dbg - - > - if test -n "$dbus_ci_system_python" = python; then - sudo apt-get -qq -y install python-gobject-2; - fi - - > - wget - http://deb.debian.org/debian/pool/main/a/autoconf-archive/autoconf-archive_20160916-1_all.deb - - 'sudo dpkg -i autoconf-archive_*_all.deb' - - 'rm autoconf-archive_*_all.deb' - - test -n "$dbus_ci_system_python" || pip install sphinx sphinx_rtd_theme tap.py - test -z "$dbus_ci_system_python" || deactivate - - test -z "$dbus_ci_system_python" || pip install --user sphinx sphinx_rtd_theme tap.py + - tools/travis-ci-setup.sh python: - "3.5" - "3.5-dev" diff --git a/tools/travis-ci-setup.sh b/tools/travis-ci-setup.sh new file mode 100755 index 0000000..a28d050 --- /dev/null +++ b/tools/travis-ci-setup.sh @@ -0,0 +1,53 @@ +#!/bin/sh + +set -e +set -u +NULL= + +sudo apt-get -qq -y update +sudo apt-get -qq -y install \ + autoconf \ + automake \ + ccache \ + dbus \ + gnome-desktop-testing \ + libdbus-1-dev \ + libtool \ + ${NULL} + +if [ -n "${dbus_ci_system_python-}" ]; then + sudo apt-get -qq -y install \ + ${dbus_ci_system_python} \ + ${dbus_ci_system_python%-dbg}-docutils \ + ${dbus_ci_system_python%-dbg}-gi \ + ${dbus_ci_system_python%-dbg}-pip \ + ${dbus_ci_system_python%-dbg}-setuptools \ + ${NULL} + + if [ "${dbus_ci_system_python%-dbg}" != "${dbus_ci_system_python}" ]; then + sudo apt-get -qq -y install ${dbus_ci_system_python%-dbg}-gi-dbg + fi + + if [ "$dbus_ci_system_python" = python ]; then + sudo apt-get -qq -y install python-gobject-2 + fi +fi + +wget \ +http://deb.debian.org/debian/pool/main/a/autoconf-archive/autoconf-archive_20160916-1_all.deb +sudo dpkg -i autoconf-archive_*_all.deb +rm autoconf-archive_*_all.deb + +if [ -n "${dbus_ci_system_python-}" ]; then + "$dbus_ci_system_python" -m pip install --user \ + sphinx \ + sphinx_rtd_theme \ + tap.py \ + ${NULL} +else + pip install \ + sphinx \ + sphinx_rtd_theme \ + tap.py \ + ${NULL} +fi |