Test on python 3.3 and 3.4 with travis

Python 3.2.x is deprecated, so I thought it would be
good to get tests running on some newer pythons. I've
switched from the python3-gi package to using 'pgi' from
pypi, because the apt-installed python3-gi was having trouble
importing.

pgi required python 3.3+ (see: https://pypi.python.org/pypi/pgi),
so I've removed python 3.2 from the test matrix. Let me know if
we're using python 3.2 anywhere, but as far as I know plinth is
run on python 3.4.3 with debian sid on the freedombox image.
This commit is contained in:
Nik Nyby 2015-10-31 12:51:56 -04:00 committed by Sunil Mohan Adapa
parent c985fdae56
commit 608897b9ec
5 changed files with 17 additions and 18 deletions

View File

@ -2,15 +2,13 @@
language: python
python:
- "3.2"
- "3.3.6"
- "3.4.3"
# Debian packages required
before_install:
- sudo apt-get update -qq
- sudo apt-get install python3-dbus python3-gi gir1.2-packagekitglib-1.0
virtualenv:
system_site_packages: true
- sudo apt-get install python3-dbus gir1.2-packagekitglib-1.0
# Command to install dependencies
install:

View File

@ -20,9 +20,9 @@ from django.core import validators
from django.utils.translation import ugettext_lazy as _
from plinth import network
import gi
gi.require_version('NM', '1.0')
from gi.repository import NM as nm
import pgi
pgi.require_version('NM', '1.0')
from pgi.repository import NM as nm
def _get_interface_choices(device_type):

View File

@ -21,11 +21,11 @@ Helper functions for working with network manager.
import collections
from django.utils.translation import ugettext_lazy as _
import gi
gi.require_version('GLib', '2.0')
from gi.repository import GLib as glib
gi.require_version('NM', '1.0')
from gi.repository import NM as nm
import pgi
pgi.require_version('GLib', '2.0')
from pgi.repository import GLib as glib
pgi.require_version('NM', '1.0')
from pgi.repository import NM as nm
import logging
import socket
import struct

View File

@ -22,11 +22,11 @@ Framework for installing and updating distribution packages
from django.contrib import messages
from django.utils.translation import ugettext as _
import functools
import gi
gi.require_version('GLib', '2.0')
from gi.repository import GLib as glib
gi.require_version('PackageKitGlib', '1.0')
from gi.repository import PackageKitGlib as packagekit
import pgi
pgi.require_version('GLib', '2.0')
from pgi.repository import GLib as glib
pgi.require_version('PackageKitGlib', '1.0')
from pgi.repository import PackageKitGlib as packagekit
import logging
import threading

View File

@ -5,3 +5,4 @@ django-stronghold
psutil
python-augeas
pyyaml
pgi >= 0.0.10.1