I got
The command "source ~/virtualenv/python3.6_with_system_site_packages/bin/activate" failed and exited with 1 during .
error when I want to test my project against different versions of Python (3.6
and 3.7
) on xenial
distro with system_site_packages: true
enabled like:
virtualenv:
system_site_packages: true
this is the job log: https://travis-ci.org/DragonComputer/Dragonfire/jobs/476074315
The problem is; I need the system site packages since my application depends on a lot of libraries installed with apt-get
. I saw this answer of Donald Stufft but it did not satisfy me.
Is it possible to test my project against all these Python versions with system_site_packages
enabled? This is my .travis.yml file:
dist: xenial
sudo: required
language: python
virtualenv:
system_site_packages: true
python:
- "3.5"
- "3.6"
- "3.7"
services:
- mysql
addons:
apt:
packages:
- xvfb
cache:
directories:
- /usr/share/dragonfire
before_install:
- mysql -u root -e "CREATE DATABASE dragonfire;"
install:
- sudo ./install-dev.sh --no-model
- sudo pip3 install pytest-faulthandler
- export DISPLAY=':99.0'
- Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
before_script:
# stop the build if there are Python syntax errors or undefined names
- flake8 . --count --select=E901,E999,F822,F823 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
script:
- python3 -m pytest --capture=sys
notifications:
on_success: change
on_failure: change # `always` will be the setting once code changes slow down