{"action":"created","issue":{"url":"https://api.github.com/repos/mottosso/Qt.py/issues/227","repository_url":"https://api.github.com/repos/mottosso/Qt.py","labels_url":"https://api.github.com/repos/mottosso/Qt.py/issues/227/labels{/name}","comments_url":"https://api.github.com/repos/mottosso/Qt.py/issues/227/comments","events_url":"https://api.github.com/repos/mottosso/Qt.py/issues/227/events","html_url":"https://github.com/mottosso/Qt.py/pull/227","id":247616968,"number":227,"title":"Custom build of Qt/PySide2 for tests","user":{"login":"fredrikaverpil","id":994357,"avatar_url":"https://avatars2.githubusercontent.com/u/994357?v=4","gravatar_id":"","url":"https://api.github.com/users/fredrikaverpil","html_url":"https://github.com/fredrikaverpil","followers_url":"https://api.github.com/users/fredrikaverpil/followers","following_url":"https://api.github.com/users/fredrikaverpil/following{/other_user}","gists_url":"https://api.github.com/users/fredrikaverpil/gists{/gist_id}","starred_url":"https://api.github.com/users/fredrikaverpil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredrikaverpil/subscriptions","organizations_url":"https://api.github.com/users/fredrikaverpil/orgs","repos_url":"https://api.github.com/users/fredrikaverpil/repos","events_url":"https://api.github.com/users/fredrikaverpil/events{/privacy}","received_events_url":"https://api.github.com/users/fredrikaverpil/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"fredrikaverpil","id":994357,"avatar_url":"https://avatars2.githubusercontent.com/u/994357?v=4","gravatar_id":"","url":"https://api.github.com/users/fredrikaverpil","html_url":"https://github.com/fredrikaverpil","followers_url":"https://api.github.com/users/fredrikaverpil/followers","following_url":"https://api.github.com/users/fredrikaverpil/following{/other_user}","gists_url":"https://api.github.com/users/fredrikaverpil/gists{/gist_id}","starred_url":"https://api.github.com/users/fredrikaverpil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredrikaverpil/subscriptions","organizations_url":"https://api.github.com/users/fredrikaverpil/orgs","repos_url":"https://api.github.com/users/fredrikaverpil/repos","events_url":"https://api.github.com/users/fredrikaverpil/events{/privacy}","received_events_url":"https://api.github.com/users/fredrikaverpil/received_events","type":"User","site_admin":false},"assignees":[{"login":"fredrikaverpil","id":994357,"avatar_url":"https://avatars2.githubusercontent.com/u/994357?v=4","gravatar_id":"","url":"https://api.github.com/users/fredrikaverpil","html_url":"https://github.com/fredrikaverpil","followers_url":"https://api.github.com/users/fredrikaverpil/followers","following_url":"https://api.github.com/users/fredrikaverpil/following{/other_user}","gists_url":"https://api.github.com/users/fredrikaverpil/gists{/gist_id}","starred_url":"https://api.github.com/users/fredrikaverpil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredrikaverpil/subscriptions","organizations_url":"https://api.github.com/users/fredrikaverpil/orgs","repos_url":"https://api.github.com/users/fredrikaverpil/repos","events_url":"https://api.github.com/users/fredrikaverpil/events{/privacy}","received_events_url":"https://api.github.com/users/fredrikaverpil/received_events","type":"User","site_admin":false}],"milestone":null,"comments":5,"created_at":"2017-08-03T07:33:02Z","updated_at":"2017-08-03T08:37:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mottosso/Qt.py/pulls/227","html_url":"https://github.com/mottosso/Qt.py/pull/227","diff_url":"https://github.com/mottosso/Qt.py/pull/227.diff","patch_url":"https://github.com/mottosso/Qt.py/pull/227.patch"},"body":"I'm creating this PR to start a discussion on how we can achieve control of which binding versions are used and which Qt version is used for these bindings.\r\n\r\n### Image\r\n\r\nInitially, I created the [fredrikaverpil/vfxplatform](https://github.com/fredrikaverpil/vfxplatform-docker) dockerhub image which I was thinking that our current Qt.py Dockerfiles could be based off. This means not using `FROM ubuntu:16.04` or `FROM centos:7` but instead something like `FROM fredrikaverpil/vfxplatform`.\r\n\r\nI knew from the start that the Qt.py Dockerfiles would then need to install Xvfb, PySide(1) and PyQt4 on top of the fredrikaverpil/vfxplatform image. I figured that PySide and PyQt4 didn't have to be built from source, as they are not that important to fit into the VFX Reference platform spec, so they could just be installed via `yum install python-pyside PyQt4`. However, I quickly noticed that PyQt4 and PyQt5 both need sip and you cannot install two different versions of sip without breaking either PyQt4 or PyQt5 (or making the build/install [non-standard and quite complex](http://pyqt.sourceforge.net/Docs/sip4/using.html#building-a-private-copy-of-the-sip-module)). Therefore PyQt4 needs to be built from source, using the same sip version used for PyQt5. This will slow down our tests from ~4 min to around ~17 min.\r\n\r\nIn the vfxplatform image, I'm also building Python from source. I'm doing this because the built-in Python wasn't built with gcc 5.3.1. I'm not sure if this is necessary if you want to follow the VFX Reference platform specs ... but I'm pretty sure we don't have to do it for our (Qt.py) needs.\r\n\r\nThis leads me to think we shouldn't base our Qt.py Dockerfiles on a rigid VFX platform spec. Better to just create a Qt.py \"install\" image which has everything _we_ need. This image can then build and install PyQt4 with the sip version used for PyQt5. We also don't have to build Python from source.\r\n\r\n### Choice of OS\r\n\r\nRight now, I've been using CentOS 7. I'm not so sure that's a great idea, since the CentOS system (e.g. `yum`) relies on Python. With Ubuntu, Python isn't required. This means that with CentOS, you must always have `python2.7` installed even if you have installed e.g. `python3.5`.\r\n\r\nWe usually write our tests by referencing `python` and relying on that the proper version is picked up, since the current Qt.py Dockerfiles only have _either_ Python 2 or Python 3 installed. If we override the CentOS system's `python` (linking it to `python3.5` for the py3.5 Dockerfile), this may break things. Therefore I'm starting to think perhaps I should re-create everything in Ubuntu instead. Actually, the Qt/PySide2 docs have Debian examples with `apt-get` all over, so it should be possible to set this up without too much headaches.\r\n\r\nI don't yet know if we can easily install the vfxplatform gcc/glibc versions easily in Ubuntu, but I also don't yet know if this is an issue at all for our use case.\r\n\r\nI'm really wondering... since e.g. Maya and Nuke are recommended to be run on RHEL/CentOS, are a lot of VFX people really using Ubuntu?"},"comment":{"url":"https://api.github.com/repos/mottosso/Qt.py/issues/comments/319905633","html_url":"https://github.com/mottosso/Qt.py/pull/227#issuecomment-319905633","issue_url":"https://api.github.com/repos/mottosso/Qt.py/issues/227","id":319905633,"user":{"login":"fredrikaverpil","id":994357,"avatar_url":"https://avatars2.githubusercontent.com/u/994357?v=4","gravatar_id":"","url":"https://api.github.com/users/fredrikaverpil","html_url":"https://github.com/fredrikaverpil","followers_url":"https://api.github.com/users/fredrikaverpil/followers","following_url":"https://api.github.com/users/fredrikaverpil/following{/other_user}","gists_url":"https://api.github.com/users/fredrikaverpil/gists{/gist_id}","starred_url":"https://api.github.com/users/fredrikaverpil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredrikaverpil/subscriptions","organizations_url":"https://api.github.com/users/fredrikaverpil/orgs","repos_url":"https://api.github.com/users/fredrikaverpil/repos","events_url":"https://api.github.com/users/fredrikaverpil/events{/privacy}","received_events_url":"https://api.github.com/users/fredrikaverpil/received_events","type":"User","site_admin":false},"created_at":"2017-08-03T08:37:02Z","updated_at":"2017-08-03T08:37:02Z","body":"> I think we should install and compile each of these into the original image, and not per build on Travis. We could upload this Qt.py image to Dockerhub for example.\r\n\r\nYou mean one image which would be used for both Python 2 and 3?"}}
{"actor":{"display_login":"fredrikaverpil"}}