From 8c01125643e5ff94c9baa898dd61add8d4739680 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 3 May 2018 13:14:37 +0100 Subject: Travis-CI: Use system Python to run pip for system Python Signed-off-by: Simon McVittie --- .travis.yml | 32 +---------------------------- tools/travis-ci-setup.sh | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 31 deletions(-) create mode 100755 tools/travis-ci-setup.sh 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 -- cgit v1.2.3