Skip to content

Commit ecb4f90

Browse files
greghope667mkrnr
andauthored
Migrate to PySide6 (#1601)
Co-authored-by: Martin Koerner <[email protected]>
1 parent 1234ae6 commit ecb4f90

File tree

96 files changed

+2283
-764
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+2283
-764
lines changed

.github/workflows/ci.yml

Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,8 @@ jobs:
207207
run: setup_pip_options
208208

209209
- name: Setup Python environment
210-
run: setup_python_env -c reqs/constraints.txt -r reqs/dist.txt -r reqs/test.txt
210+
run: setup_python_env -c reqs/constraints.txt -r reqs/dist.txt -r reqs/test.txt
211+
211212
# Test {{{
212213

213214
- name: Run tests
@@ -262,7 +263,8 @@ jobs:
262263
run: setup_osx_python '3.9'
263264

264265
- name: Setup Python environment
265-
run: setup_python_env -c reqs/constraints.txt -r reqs/dist.txt -r reqs/test.txt
266+
run: setup_python_env -c reqs/constraints.txt -r reqs/dist.txt -r reqs/test.txt
267+
266268
# Test {{{
267269

268270
- name: Run tests
@@ -323,7 +325,8 @@ jobs:
323325
run: setup_pip_options
324326

325327
- name: Setup Python environment
326-
run: setup_python_env -c reqs/constraints.txt -r reqs/dist.txt -r reqs/test.txt
328+
run: setup_python_env -c reqs/constraints.txt -r reqs/dist.txt -r reqs/test.txt
329+
327330
# Test {{{
328331

329332
- name: Run tests
@@ -379,7 +382,8 @@ jobs:
379382
run: setup_pip_options
380383

381384
- name: Setup Python environment
382-
run: setup_python_env -c reqs/constraints.txt -r reqs/dist.txt -r reqs/test.txt
385+
run: setup_python_env -c reqs/constraints.txt -r reqs/dist.txt -r reqs/test.txt
386+
383387
# Test {{{
384388

385389
- name: Run tests
@@ -435,7 +439,8 @@ jobs:
435439
run: setup_pip_options
436440

437441
- name: Setup Python environment
438-
run: setup_python_env -c reqs/constraints.txt -r reqs/dist.txt -r reqs/test.txt
442+
run: setup_python_env -c reqs/constraints.txt -r reqs/dist.txt -r reqs/test.txt
443+
439444
# Test {{{
440445

441446
- name: Run tests
@@ -490,8 +495,15 @@ jobs:
490495
- name: Setup pip options
491496
run: setup_pip_options
492497

498+
- name: Install system dependencies
499+
run: apt_get_install libdbus-1-dev libdbus-glib-1-dev libudev-dev libusb-1.0-0-dev libegl-dev libxkbcommon-x11-0
500+
493501
- name: Setup Python environment
494-
run: setup_python_env -c reqs/constraints.txt -r reqs/dist.txt -r reqs/dist_extra_gui_qt.txt -r reqs/test.txt
502+
run: setup_python_env -c reqs/constraints.txt -r reqs/dist.txt -r reqs/dist_extra_gui_qt.txt -r reqs/test.txt
503+
504+
- name: Build Resources
505+
run: python setup.py build_resources
506+
495507
- name: Build UI
496508
run: python setup.py build_ui
497509

@@ -553,7 +565,8 @@ jobs:
553565
run: setup_pip_options
554566

555567
- name: Setup Python environment
556-
run: setup_python_env -c reqs/constraints.txt -r reqs/packaging.txt -r reqs/setup.txt
568+
run: setup_python_env -c reqs/constraints.txt -r reqs/packaging.txt -r reqs/setup.txt
569+
557570
- name: Patch version
558571
id: set_version
559572
run: |
@@ -603,7 +616,7 @@ jobs:
603616

604617
- name: List cache contents
605618
run: list_cache
606-
619+
607620
outputs:
608621
version: ${{ steps.set_version.outputs.version }}
609622
# }}}
@@ -646,10 +659,11 @@ jobs:
646659
run: setup_pip_options
647660

648661
- name: Install system dependencies
649-
run: apt_get_install libdbus-1-dev libdbus-glib-1-dev libudev-dev libusb-1.0-0-dev
662+
run: apt_get_install libdbus-1-dev libdbus-glib-1-dev libudev-dev libusb-1.0-0-dev libegl-dev libxkbcommon-x11-0
650663

651664
- name: Setup Python environment
652-
run: setup_python_env -c reqs/constraints.txt -r reqs/build.txt -r reqs/setup.txt
665+
run: setup_python_env -c reqs/constraints.txt -r reqs/build.txt -r reqs/setup.txt
666+
653667
- name: Patch version
654668
id: set_version
655669
run: |
@@ -718,7 +732,8 @@ jobs:
718732
run: setup_osx_python '3.9'
719733

720734
- name: Setup Python environment
721-
run: setup_python_env -c reqs/constraints.txt -r reqs/build.txt -r reqs/setup.txt
735+
run: setup_python_env -c reqs/constraints.txt -r reqs/build.txt -r reqs/setup.txt
736+
722737
- name: Patch version
723738
id: set_version
724739
run: |
@@ -793,7 +808,8 @@ jobs:
793808
run: setup_pip_options
794809

795810
- name: Setup Python environment
796-
run: setup_python_env -c reqs/constraints.txt -r reqs/build.txt -r reqs/setup.txt
811+
run: setup_python_env -c reqs/constraints.txt -r reqs/build.txt -r reqs/setup.txt
812+
797813
- name: Patch version
798814
id: set_version
799815
run: |
@@ -876,6 +892,13 @@ jobs:
876892
with:
877893
path: dist
878894

895+
- name: Publish GitHub release (${{ needs.analyze.outputs.release_type }})
896+
env:
897+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
898+
RELEASE_TYPE: ${{ needs.analyze.outputs.release_type }}
899+
RELEASE_VERSION: ${{ needs.test_packaging.outputs.version }}
900+
run: publish_github_release
901+
879902
- name: Publish PyPI release
880903
if: needs.analyze.outputs.release_type == 'tagged'
881904
env:
@@ -885,13 +908,6 @@ jobs:
885908
# Optional: twine will fallback to default if empty.
886909
TWINE_REPOSITORY_URL: ${{ secrets.PYPI_URL }}
887910
run: publish_pypi_release
888-
889-
- name: Publish GitHub release (${{ needs.analyze.outputs.release_type }})
890-
env:
891-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
892-
RELEASE_TYPE: ${{ needs.analyze.outputs.release_type }}
893-
RELEASE_VERSION: ${{ needs.test_packaging.outputs.version }}
894-
run: publish_github_release
895911
# }}}
896912

897913
# vim: foldmethod=marker foldlevel=0

.github/workflows/ci/helpers.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ setup_python_env()
114114
run_eval "echo PYTHONUSERBASE='$PYTHONUSERBASE' >>\$GITHUB_ENV"
115115
if [ ! -e "$python_userbase" ]
116116
then
117-
get_base_devel --no-warn-script-location --user || die
118-
install_wheels --no-warn-script-location --user "$@" || die
117+
get_base_devel --no-warn-script-location || die
118+
install_wheels --no-warn-script-location "$@" || die
119119
if [ "$RUNNER_OS" = 'Windows' ]
120120
then
121121
run rm -rf "$python_userbase"/Python*/Scripts

.github/workflows/ci/skiplist_default.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ CONTRIBUTING.md
99
NEWS.md
1010
README.md
1111
doc/*
12-
launch.bat
13-
launch.sh
1412
linux/README.md
1513
linux/packpack.mk
1614
linux/packpack.sh

.github/workflows/ci/workflow_template.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,14 @@ jobs:
131131
run: setup_osx_python '<@ j.python @>'
132132

133133
<% endif %>
134-
<% if j.type == 'build' and j.os == 'Linux' %>
134+
<% if j.type in ['build', 'test_gui_qt'] and j.os == 'Linux' %>
135135
- name: Install system dependencies
136-
run: apt_get_install libdbus-1-dev libdbus-glib-1-dev libudev-dev libusb-1.0-0-dev
136+
run: apt_get_install libdbus-1-dev libdbus-glib-1-dev libudev-dev libusb-1.0-0-dev libegl-dev libxkbcommon-x11-0
137137

138138
<% endif %>
139139
- name: Setup Python environment
140140
run: setup_python_env -c reqs/constraints.txt<% for r in j.reqs %> -r <@ r @><% endfor %>
141+
141142

142143
<% if j.type in ['build', 'test_packaging'] %>
143144
- name: Patch version
@@ -150,6 +151,9 @@ jobs:
150151
151152
<% endif %>
152153
<% if j.type == 'test_gui_qt' %>
154+
- name: Build Resources
155+
run: python setup.py build_resources
156+
153157
- name: Build UI
154158
run: python setup.py build_ui
155159

@@ -260,7 +264,7 @@ jobs:
260264
- name: List cache contents
261265
run: list_cache
262266
<% if j.type == 'test_packaging' %>
263-
267+
264268
outputs:
265269
version: ${{ steps.set_version.outputs.version }}
266270
<% endif %>

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,9 @@ __pycache__/
3333
# macOS
3434
.DS_Store
3535

36+
# Virtual environments
37+
/.venv/
38+
/venv/
39+
40+
3641
# vim: ft=cfg

MANIFEST.in

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ recursive-include doc *.png
99
recursive-include doc *.svg
1010
recursive-include doc *.py
1111
recursive-include doc *.txt
12-
include launch.bat
13-
include launch.sh
1412
include linux/*
1513
include linux/appimage/*
1614
include news.d/api/*
@@ -21,9 +19,9 @@ include osx/*
2119
include osx/app_resources/*
2220
include osx/dmg_resources/*
2321
include plover/assets/*
22+
include plover/gui_qt/*.qrc
2423
include plover/gui_qt/*.ui
2524
include plover/gui_qt/resources/*.png
26-
include plover/gui_qt/resources/*.qrc
2725
include plover/gui_qt/resources/*.svg
2826
include plover/messages/*/LC_MESSAGES/*.po
2927
include plover/messages/plover.pot
@@ -35,11 +33,8 @@ include test/*.py
3533
include test/gui_qt/*.py
3634
include tox.ini
3735
include windows/*
38-
# Exclude: CI/Git/GitHub specific files,
39-
# as well as generated Python files (UI).
40-
exclude .gitignore
36+
# without first including it, exluding .readthedocs.yml results in a warning when running locally
37+
include .readthedocs.yml
4138
exclude .readthedocs.yml
4239
exclude plover/gui_qt/*_rc.py
4340
exclude plover/gui_qt/*_ui.py
44-
exclude plover/gui_qt/.gitignore
45-
prune .github

doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
copyright = "Open Steno Project"
77
author = copyright
88

9-
release = "4.0.0"
9+
release = "5.0.0.dev1"
1010
version = release
1111

1212
# -- General configuration ---------------------------------------------------

doc/developer_guide.md

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,52 @@
22

33
You need Python >= 3.8 installed, and you need [tox](https://pypi.org/project/tox/) >= 4.0.
44

5-
Using tox takes care of all the details of creating and managing an isolated
6-
virtual environment, installing the necessary dependencies, and isolating
7-
testsuite runs.
5+
Tox simplifies the process of creating and managing isolated virtual environments,
6+
handling dependency installation, and running the test suite in isolation. This
7+
ensures a clean and consistent testing environment.
88

9-
The command for using tox is: `tox r {-e envlist} {-- arguments}`. Use `tox -a
9+
However, it is still recommended to install and run tox within a Python virtual
10+
environment created using tools like [venv](https://docs.python.org/3/library/venv.html).
11+
This helps keep your global Python environment clean, avoids project conflicts, and
12+
isolates tox and its dependencies.
13+
14+
The command for using tox is: `tox {-e envlist} {-- arguments}`. Use `tox -a
1015
-v` to get a list of available environments.
1116

1217
The same virtual environment is reused by the following tox environments:
1318

14-
- `tox r -e test -- ARGS`: run the testsuite. This is the default environment
19+
- `tox -e test -- ARGS`: run the testsuite. This is the default environment
1520
when not provided.
16-
- `tox r -e launch -- ARGS`: run Plover from source.
17-
- `tox r -e setup -- COMMAND`: run `./setup.py COMMAND`.
18-
- `tox r -e packaging_checks`: run the same packaging checks as the CI (add `--
21+
22+
Example: `tox -e test -- test/gui_qt`
23+
- `tox -e launch -- ARGS`: run Plover from source.
24+
25+
Example: `tox -e launch -- -l debug`
26+
- `tox -e setup -- COMMAND`: run `./setup.py COMMAND` to create a binary
27+
distribution. See also section below.
28+
29+
Example: `tox -e setup -- bdist_appimage`
30+
- `tox -e packaging_checks`: run the same packaging checks as the CI (add `--
1931
-n` to see a dry-run of the exact checks).
20-
- `tox r -e plugins_install`: install the distribution plugins (or the specified
21-
plugins when run with `tox -e plugins_install -- REQS`). Note that this does
22-
not use the plugins manager for installing.
23-
- `tox r -e release_prepare -- NEW_VERSION`: execute all the steps necessary for
32+
- `tox -e plugins_install -- ARGS`: install the plugins specified in `ARGS`, where
33+
plugins are separated by space. You can also specify plugin versions. Note that
34+
this process uses pip directly for installation, not the plugins manager.
35+
36+
Example: `tox -e plugins_install -- some_plugin==1.0.0 another_plugin`
37+
- `tox -e release_prepare -- NEW_VERSION`: execute all the steps necessary for
2438
preparing a new release: patch the version to `NEW_VERSION` and update
2539
`NEWS.md`, staging all the changes for review.
26-
- `tox r -e release_finalize`: finalize the release: commit the staged changes,
40+
- `tox -e release_finalize`: finalize the release: commit the staged changes,
2741
create an annotated tag, and print the git command necessary for pushing the
2842
release to GitHub.
2943

30-
The actual virtual environment lives in `.tox/dev`, and can be ["activated" like
44+
The virtual environment created by tox lives in `.tox/dev`, and can be [activated like
3145
any other virtual environment](https://virtualenv.pypa.io/en/latest/user_guide.html#activators).
3246

3347
The configuration also provides support for lightweight tests only environment:
3448
`pyX`, where `X` is the version of the Python interpreter to use. E.g. running
35-
`tox r -e 'py3,py36,py37,py38,py39` will execute the testsuite for each version of Python we
36-
support.
49+
`tox -e 'py3,py36,py37,py38,py39` will execute the testsuite for each version
50+
of Python we support.
3751

3852
# Creating a binary distribution
3953

doc/plugin-dev/gui_tools.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ as follows:
55

66
```python
77
from setuptools import setup
8-
from plover_build_utils.setup import BuildPy, BuildUi
8+
from plover_build_utils.setup import BuildPy, BuildResources, BuildUi
99

1010
BuildPy.build_dependencies.append("build_ui")
11-
BuildUi.hooks = ["plover_build_utils.pyqt:fix_icons"]
11+
BuildPy.build_dependencies.append("build_resources")
1212
CMDCLASS = {
1313
"build_py": BuildPy,
14+
"build_resources": BuildResources,
1415
"build_ui": BuildUi,
1516
}
1617

linux/appimage/blacklist.txt

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -31,37 +31,33 @@
3131
# Plover.
3232
:usr/lib/python${pyversion}/site-packages/plover
3333
gui_qt/*.ui
34-
gui_qt/resources
3534
messages/**/*.po
3635
messages/plover.pot
3736

38-
# PyQt5.
37+
# PySide6.
3938
:usr/bin
40-
pylupdate5
41-
pyrcc5
42-
pyuic5
43-
:usr/lib/python${pyversion}/site-packages/PyQt5
39+
pylupdate6
40+
pyuic6
41+
:usr/lib/python${pyversion}/site-packages/PySide6
4442
**/*Designer*
4543
**/*[Hh]elp*
4644
**/*[Qq]ml*
4745
**/*[Qq]uick*
4846
**/*Test*
49-
**/*[Ww]ayland*
5047
**/*[Ww]eb[Ee]ngine*
5148
bindings
52-
Qt5/plugins/egldeviceintegrations
53-
Qt5/plugins/geoservices
54-
Qt5/plugins/platforms/libqeglfs.so
55-
Qt5/plugins/platforms/libqlinuxfb.so
56-
Qt5/plugins/platforms/libqminimal.so
57-
Qt5/plugins/platforms/libqminimalegl.so
58-
Qt5/plugins/platforms/libqoffscreen.so
59-
Qt5/plugins/platforms/libqvnc.so
60-
Qt5/plugins/platforms/libqwebgl.so
61-
Qt5/plugins/sceneparsers
62-
Qt5/plugins/webview
49+
Qt6/plugins/egldeviceintegrations
50+
Qt6/plugins/geoservices
51+
Qt6/plugins/platforms/libqeglfs.so
52+
Qt6/plugins/platforms/libqlinuxfb.so
53+
Qt6/plugins/platforms/libqminimal.so
54+
Qt6/plugins/platforms/libqminimalegl.so
55+
Qt6/plugins/platforms/libqoffscreen.so
56+
Qt6/plugins/platforms/libqvnc.so
57+
Qt6/plugins/platforms/libqwebgl.so
58+
Qt6/plugins/sceneparsers
59+
Qt6/plugins/webview
6360
pylupdate*
64-
pyrcc*
6561
uic
6662

6763
# vim: ft=config

0 commit comments

Comments
 (0)