Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qt 5 and continuous integration #93

Closed
mottosso opened this issue Aug 8, 2016 · 4 comments
Closed

Qt 5 and continuous integration #93

mottosso opened this issue Aug 8, 2016 · 4 comments
Assignees

Comments

@mottosso
Copy link
Owner

mottosso commented Aug 8, 2016

Goal

Enable testing of Qt.py with Pyside2 and PyQt5.

Motivation

At the moment, testing only happens with PySide and PyQt4, but the codebase and tests remain open for expansion towards bindings for Qt 5. The reason they haven't yet seen the day of light has been due to difficulties in installing each binding in an efficient manner.

PyQt4 and PySide both have pre-compiled counterparts that take a matter of seconds to install, whereas Qt 5 bindings are more complex, especially PySide2, requiring manual compilation. (On Python < 3.5).

Docker has always been an option, but the problem has been losing out on being able to concurrently run tests, one build per version of Python. But this technique should enable greater concurrency, and greater distribution of tasks with one build per version of Python and binding.

Implementation

The idea is simple. Utilise the build matrix functionality to provide many identical environments with varying environment variables. The environment variables can then be used to programatically select an appropriate Docker image.

@mottosso
Copy link
Owner Author

mottosso commented Aug 11, 2016

For the one interested in implementing this, here are a few hints.

  1. Modify the current Dockerfile to provide each binding for a single version of Python, Ubuntu 14 defaults to Python 2.7, whereas 16.04 I think defaults to 3.4, the next to 3.5 and so on.
  2. Rename this to e.g. Dockerfile.py27 and create another one for 2.6, 3.4 and 3.5. These should be enough
  3. In the .travis.yml, add each Python version. The version will then be available as an environment variable.
  4. In the script: section, use this variable to select an appropriate Dockerfile, build it, and run it.
  5. Once it works, we can upload each image to the docker hub, such that each becomes a download, rather than being built each time. This should shave off lots of time per build.

@mottosso mottosso self-assigned this Aug 12, 2016
mottosso added a commit to abstractfactory/Qt.py that referenced this issue Aug 13, 2016
@hdd
Copy link
Contributor

hdd commented Aug 22, 2016

Thanks for this, does this also implement the contextmanager for PySide2 and Qt5 in tests ?

@mottosso
Copy link
Owner Author

It does, yes. See the top of tests.py.

@hdd
Copy link
Contributor

hdd commented Aug 22, 2016

yeap, sorry , forgot to merge upstream back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants