Stvad / CrowdAnki

Plugin for Anki SRS designed to facilitate cooperation on creation of notes and decks.
MIT License
533 stars 44 forks source link

Add generated ui.py files for qt6 #173

Closed aplaice closed 1 year ago

aplaice commented 1 year ago

Fix #170.

We're slavishly copying the convention used by anki in qt/aqt/forms/ (up to the presence of the type: ignore comment).

The old qt5 files are moved from _ui.py to _ui_qt5.py.

The new qt6 files are *_ui_qt6.py.

generate_ui.sh was run from within the pipenv (pipenv shell).

I've changed the script to have pipenv run ... at the start of all the lines, and updated CONTRIBUTING.md.

In order to have easy access to pyuic6, I added PyQt6 to our dev dependencies (while minimally changing Pipfile.lock — we don't want to fully update Pipfile.lock, since I've had issues with making pure-python (C-free) builds (for dist/) of the later versions of some of our dependencies (PyYAML, I think)).

AFAICT mostly pyuic6 isn't packaged in stable Linux distros, so running it from our pipenv is probably the cleanest solution, and we may as well switch to running pyuic5 from there, for consistency.


Ugh. I'm being bitten by #145. (aqt.qt is being mocked, so qtmajor is also a mock, so can't be compared... I'll probably solve this by going deeper in on the "hack-ish" test solution. :D )