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

Transition to PySide2 and Qt 5.x #185

Merged
merged 100 commits into from
Jun 17, 2018
Merged

Transition to PySide2 and Qt 5.x #185

merged 100 commits into from
Jun 17, 2018

Conversation

albertosottile
Copy link
Member

@albertosottile albertosottile commented May 7, 2018

This PR contains the migration of Syncplay to PySide2, following the discussion of issue #152.

While it is true that PySide2 (side note: the official name is now Qt for Python) has not been officially released yet, the binding is stable enough for beta testing its behavior with Syncplay. Furthermore, in view of the upcoming dismissal of Python 2, we need to accelerate the transition to Qt 5. Ideally, once this PR is merged, we will release a beta 1.5.4 version to allow extensive tests of Syncplay on Qt 5 on all the platforms.

Despite the large number of commits indicated by GitHub, only the packaging files are changed in this PR, while the Syncplay code is actually the same as in current master, thanks to Qt.py (with the exception of a few tabs in ui/ConfigurationGetter.py).

The code in this PR updates the packaging CI systems as detailed hereafter:

  • Travis: embeds a custom wheel of PySide2 5.9 and Qt 5.9.5 in packaged .dmg for macOS.
  • AppVeyor: embeds conda binaries of PySide2 5.6 and Qt 5.6.2 in packaged setup .exe and portable .zip for Windows.
  • AppVeyor: embeds a blank syncplay.ini and an instruction file for LUA scripts in the portable release for Windows.

Incidentally, this PR solves issue #149.

Known limitations:

  • this PR drops the support of macOS 10.10 due to the lack of a bottled version of Qt 5.9 for that operative system. This issue is mitigated by our legacy version that has already been released and supports 10.6.8 and following.
  • on Windows, we are still using Qt 5.6 due to the lack of a conda binary of PySide2 for Qt 5.9. It would be better for us to embed Qt 5.9 on both platforms since it will be supported at least for the next two years. This issue will most likely resolve itself when PySide2 approaches an official release. Otherwise, in the future, we could start experimenting with official PySide2 wheels on Windows.
  • on macOS, custom wheels are needed because py2app does not work with official PySide2 wheels, which integrate their own version of Qt. This issue is mitigated by a custom script that currently packages the wheels used in Syncplay.

albertosottile and others added 30 commits October 4, 2017 15:19
@albertosottile
Copy link
Member Author

I just added three commits to fix issue #184, add a Qt 5 license notice, and fix a typo in all the messages.

@albertosottile
Copy link
Member Author

I just added two commits to fix issue #184 (for real this time) and add a license notice for Requests (Apache 2). @Et0h did you make any tests on Windows for this PR or are you aware of test results from other people? When do you think we should merge this?

@albertosottile
Copy link
Member Author

albertosottile commented May 29, 2018

Side note: I tried to embed the PySide2 official wheels on Windows, but they are not releasing them for x86 and, as far as I know, there are no wheels for py2exe_py2 for win_amd64. So, for the moment, we are stuck with conda packages. We could attempt this replacement after migrating the codebase to Python 3 and PyInstaller.

EDIT: I just found this in the Qt for Python Development Notes of this week

- 32bit win wheels not available yet

So, maybe there is still hope to have official wheels suitable for the current packaging of Syncplay for Windows.

@albertosottile
Copy link
Member Author

Updated after merging PR #188.

@albertosottile
Copy link
Member Author

albertosottile commented Jun 13, 2018

Qt for Python was released today, as a technical preview (v5.11.0 TP), with some caveats:

  • Only Qt 5.11 and onwards will be supported
  • Official wheels can be downloaded from here (they are waiting to include them in PyPi)
  • As you can see, there are no wheels for cp27 on Windows and apparently they will not release them.

In summary, this is the status of this PR for the three platforms:

  • Windows: we are still using a (quite old) PySide2 5.6 package from anaconda. There is no way to use PySide2 official wheels. We can either build our own wheels or wait to migrate the GUI libraries on this platform.

  • macOS: the latest commits embedded PySide2 v5.11.0 TP in the binaries, so everything should be ready to release a beta (note for @Et0h: we are using custom-built PySide2 wheels with the segfault commit reverted, as suggested by the PySide2 team).

  • Linux: the codebase is ready for testing and now PySide2 is installable directly from official wheels by running pip install --index-url=http://download.qt.io/official_releases/QtForPython/ pyside2 --trusted-host download.qt.io so, I encourage everyone to test it. I suggest to release the beta of Syncplay and update the Linux installation instructions to include PySide2 official wheels, instead of PySide 1.x.

@albertosottile
Copy link
Member Author

For the moment, we decided to stick with PySide 1.x on Windows, and migrate to PySide2 v5.11.0 on the other two platforms. The PR has just been updated accordingly.

@Et0h
Copy link
Contributor

Et0h commented Jun 15, 2018

@albertosottile Am I correct that the primary change of this PR is to move the macOS default build from PySide1 to a Syncplay-compatible version of PySide2 and that after this PR Linux users should continue to be able to use either PySide1 or PySide2?

@albertosottile
Copy link
Member Author

Yes, perfect recap.

Copy link
Contributor

@Et0h Et0h left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just tested on Windows 10 and it doesn't seem to break anything.

@Et0h Et0h merged commit cad237c into Syncplay:master Jun 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants