diff --git a/.travis.yml b/.travis.yml index 6fb1979..9229792 100644 --- a/.travis.yml +++ b/.travis.yml @@ -54,12 +54,15 @@ install: - popd # PySide - if [ $TRAVIS_PYTHON_VERSION != '3.5' && $TRAVIS_PYTHON_VERSION != '3.6' ]; then pip install --find-links wheelhouse/ pyside; fi + # PySide2 + - if [ $TRAVIS_PYTHON_VERSION != '3.4' ]; then pip install pyside2; fi # flake8 style checker - pip install flake8 pep8-naming flake8-debugger flake8-docstrings pytest-timeout flake8-commas script: - flake8 - flake8 --select=D1 quamash/*.py - if [ $TRAVIS_PYTHON_VERSION != '3.5' && $TRAVIS_PYTHON_VERSION != '3.6']; then QUAMASH_QTIMPL=PySide py.test; fi + - if [ $TRAVIS_PYTHON_VERSION != '3.4']; then QUAMASH_QTIMPL=PySide2 py.test; fi - QUAMASH_QTIMPL=PyQt4 py.test - QUAMASH_QTIMPL=PyQt5 py.test cache: diff --git a/README.rst b/README.rst index 21e8be1..99e18d4 100644 --- a/README.rst +++ b/README.rst @@ -39,7 +39,7 @@ Implementation of the `PEP 3156`_ Event-Loop with Qt Requirements ============ -Quamash requires Python 3.4 or Python 3.3 with the backported ``asyncio`` library and either PyQt4, PyQt5 or PySide. +Quamash requires Python >=3.4 with the backported ``asyncio`` library and either PyQt4, PyQt5, PySide or PySide2. Installation ============ @@ -115,6 +115,7 @@ Changelog ========= Version 0.6.1 +------------- * Python 3.7 support (no automated test coverage) Version 0.6.0 @@ -216,30 +217,27 @@ Continuous Integration & Supported Platforms This project uses Travis CI to perform tests on linux (Ubuntu 12.04 LTS "Precise Pangolin") and Appveyor (Windows Server 2012 R2, similar to Windows 8) to perform continuous integration. -On linux, Python 3.3 and 3.4 with PySide, PyQt4, and PyQt5 are tested. On windows, Python 3.4 with -PySide, PyQt4 and PyQt5 are tested, but Python 3.3 is only tested with PySide since binary installers -for PyQt are not provided for Python 3.3 (at least not the newest versions of PyQt), and compiling -from source probably isn't worth it. - -Python 3.5 is now tested on linux with PyQt4 and PyQt5. - Testing Matrix ~~~~~~~~~~~~~~ +----------------------+---------+---------+--------------+----------------+ | | PyQt4 | PyQt5 | PySide (Qt4) | PySide 2 (Qt5) | +======================+=========+=========+==============+================+ -| Linux - Python 3.3 | yes | yes | yes | planned | +| Linux - Python 3.3 | yes | yes | yes | n/a | ++----------------------+---------+---------+--------------+----------------+ +| Linux - Python 3.4 | yes | yes | yes | n/a | ++----------------------+---------+---------+--------------+----------------+ +| Linux - Python 3.5 | yes | yes | n/a | yes | +----------------------+---------+---------+--------------+----------------+ -| Linux - Python 3.4 | yes | yes | yes | planned | +| Linux - Python 3.6 | yes | yes | n/a | yes | +----------------------+---------+---------+--------------+----------------+ -| Linux - Python 3.5 | yes | yes | n/a | planned | +| Windows - Python 3.3 | no | no | yes | n/a | +----------------------+---------+---------+--------------+----------------+ -| Windows - Python 3.3 | no | no | yes | no | +| Windows - Python 3.4 | yes | yes | yes | n/a | +----------------------+---------+---------+--------------+----------------+ -| Windows - Python 3.4 | yes | yes | yes | planned | +| Windows - Python 3.5 | n/a | yes | n/a | yes | +----------------------+---------+---------+--------------+----------------+ -| Windows - Python 3.5 | planned | planned | planned | planned | +| Windows - Python 3.6 | n/a | yes | n/a | yes | +----------------------+---------+---------+--------------+----------------+ License diff --git a/appveyor.yml b/appveyor.yml index 0093bac..8ea6003 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -19,12 +19,12 @@ environment: - PYTHON: "C:\\Python35-x64" PYTHON_VERSION: "3.5.x" PYTHON_ARCH: "64" - QTIMPL: "PyQt4" + QTIMPL: "PySide2" - - PYTHON: "C:\\Python36-x64" - PYTHON_VERSION: "3.6.x" + - PYTHON: "C:\\Python35" + PYTHON_VERSION: "3.5.x" PYTHON_ARCH: "64" - QTIMPL: "PyQt4" + QTIMPL: "PySide2" - PYTHON: "C:\\Python36-x64" PYTHON_VERSION: "3.6.x" @@ -35,6 +35,16 @@ environment: PYTHON_VERSION: "3.6.x" PYTHON_ARCH: "32" QTIMPL: "PyQt5" + + - PYTHON: "C:\\Python36-x64" + PYTHON_VERSION: "3.6.x" + PYTHON_ARCH: "64" + QTIMPL: "PySide2" + + - PYTHON: "C:\\Python36" + PYTHON_VERSION: "3.6.x" + PYTHON_ARCH: "32" + QTIMPL: "PySide2" init: - "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH% %QTIMPL%" diff --git a/quamash/__init__.py b/quamash/__init__.py index 1c16118..9aef169 100644 --- a/quamash/__init__.py +++ b/quamash/__init__.py @@ -29,7 +29,7 @@ QtModule = importlib.import_module(QtModuleName) if not QtModule: - for QtModuleName in ('PyQt5', 'PyQt4', 'PySide'): + for QtModuleName in ('PyQt5', 'PySide2', 'PyQt4', 'PySide'): try: QtModule = importlib.import_module(QtModuleName) except ImportError: @@ -44,8 +44,9 @@ QtCore = importlib.import_module(QtModuleName + '.QtCore', package=QtModuleName) QtGui = importlib.import_module(QtModuleName + '.QtGui', package=QtModuleName) if QtModuleName == 'PyQt5': - from PyQt5 import QtWidgets - QApplication = QtWidgets.QApplication + from PyQt5.QtWidgets import QApplication +elif QtModuleName == 'PySide2': + from PySide2.QtWidgets import QApplication else: QApplication = QtGui.QApplication