summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander.sulfrian@fu-berlin.de>2017-08-17 21:32:52 +0200
committerAlexander Sulfrian <alexander.sulfrian@fu-berlin.de>2017-08-17 23:03:42 +0200
commit0fdabbcb4668d5f70f76c08a6e3216c5542e7457 (patch)
tree94df824b4ea6728e4fd0e82e7c358a55b318d3df
parente1dad29296e49c574c16c43e6753a4f685056f25 (diff)
downloadbcfg2-0fdabbcb4668d5f70f76c08a6e3216c5542e7457.tar.gz
bcfg2-0fdabbcb4668d5f70f76c08a6e3216c5542e7457.tar.bz2
bcfg2-0fdabbcb4668d5f70f76c08a6e3216c5542e7457.zip
travis-ci: Fix "with_system_site_packages"
The "with_system_site_packages" virtualenv seems to be missing the pymodules directory containing python modules installed with the python-support debian helper. So we use the default environment and manually add the references to the system-wide python packages.
-rw-r--r--.travis.yml4
-rwxr-xr-xtestsuite/install.sh10
2 files changed, 12 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml
index 022201bab..af365b9d9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -32,8 +32,8 @@ matrix:
packages: *build_deps_optional
- python: "2.7"
- - python: "2.7_with_system_site_packages"
- env: WITH_OPTIONAL_DEPS=yes TEST_SPHINX=yes
+ - python: "2.7"
+ env: WITH_OPTIONAL_DEPS=yes WITH_SYSTEM_SITE_PACKAGES=yes TEST_SPHINX=yes
addons:
apt:
packages: [*build_deps_optional, python-gamin, python-selinux]
diff --git a/testsuite/install.sh b/testsuite/install.sh
index 01c5199f2..af07de0a9 100755
--- a/testsuite/install.sh
+++ b/testsuite/install.sh
@@ -2,6 +2,7 @@
# install script for Travis-CI
PYVER=$(python -c 'import sys;print(".".join(str(v) for v in sys.version_info[0:2]))')
+SITE_PACKAGES=$(python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())')
if [[ ${PYVER:0:1} == "2" && $PYVER != "2.7" && $PYVER != "2.6" ]]; then
pip install -r testsuite/requirements-legacy.txt
@@ -46,6 +47,15 @@ else
fi
fi
+# Use system site-packages and pymodules
+if [[ "$WITH_SYSTEM_SITE_PACKAGES" == "yes" ]]; then
+ cat <<EOF > "$SITE_PACKAGES/system-packages.pth"
+/usr/lib/python$PYVER/site-packages/
+/usr/lib/python$PYVER/dist-packages/
+/usr/lib/pymodules/python$PYVER/
+EOF
+fi
+
# Setup the local xml schema cache
download_schema() {
if [[ ! -e "$1" ]]; then