samschott / maestral-qt

A Qt interface for the Maestral daemon
MIT License
10 stars 3 forks source link

Legacy maestral-qt with Qt4 support? #28

Open barracuda156 opened 8 months ago

barracuda156 commented 8 months ago

@samschott Is it possible to build maestral-qt 1.3.1 with PyQt4 instead?

Why bother: I wanna have maestral with GUI working on older macOS, in particular PowerPC ones. The last watchdog version to build there is 0.10.3, which corresponds to maestral 1.3.1, apparently. (It may be possible to build a somewhat later watchdog by adding fallback code for fsevents, but I have no idea if that will work with a newer version of maestral.) Building maestral-cocoa is likely to be problematic on older macOS if possible at all. (Or if nothing compiles there, then it is likely not to work correctly anyway.) Qt-based option seems much more realistic, however Qt5 is broken on PowerPC and even older Intel. Qt4 works nicely and reliably though.

samschott commented 8 months ago

Unfortunately, Qt4 support is not on the roadmap. Not even Qt5. You'll need to be happy with the CLI I'm afraid. That being said, there might also be other hurdles to overcome:

I'm afraid you'll be on your own with this one!

barracuda156 commented 8 months ago

@samschott Thank you for responding!

Pythons are there (there are no pre-built distributions, but building them is trivial and streamlined, as long as a single arch is built), and while there are a few rather obscure issues with them (which seem to seldom show up), generally speaking, they should and do work. (Certainly they do in a context of build systems; I do not have much end-user software written in Python to make a credible judgement in that regard.)

watchdog 0.10.3 apparently passes all tests, FWIW. But yeah, I do not expect this sort of thing to work flawlessly.

Rust is broken, until GCC implementation of it is ready for real-life applications. (gccrs builds and mostly passes its test-suite – at least that was the case few months back.) Alternative pathway may be mrustc, but we got stuck in the middle of the build, and I am afraid it is not something to be fixed quickly. (It is quite unfortunate that many developers went with Rust, which builds only with itself – questionable for security – and is broken on multiple platforms, but here we are.)

Asking about Qt4 I rather meant if some old version worked with it or may be could be trivially modified to work. Current version will be pointless anyway (due to other dependencies broken), and understandably a hardly justified pain to take.

samschott commented 8 months ago

watchdog 0.10.3 apparently passes all tests, FWIW. But yeah, I do not expect this sort of thing to work flawlessly.

Also the integration tests? I would be very surprised. Note that those will need to be run against an actual Dropbox account (free tier will do just fine).

Asking about Qt4 I rather meant if some old version worked with it or may be could be trivially modified to work.

There was a Qt5 version once, no Qt4. As for migrating or using a shim, there might be some options out there such as qtpy where older releases might have PyQt4 support.

barracuda156 commented 8 months ago

Also the integration tests?

I just ran port test, so perhaps only standard tests were included.

============================= test session starts ==============================
platform darwin -- Python 3.11.6, pytest-7.4.3, pluggy-1.3.0
rootdir: /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_python_py-watchdog/py311-watchdog/work/watchdog-0.10.3
configfile: setup.cfg
plugins: flaky-3.7.0
collected 81 items / 3 skipped

tests/test_delayed_queue.py ..                                           [  2%]
tests/test_emitter.py sssssssssssssssssss                                [ 25%]
tests/test_events.py ..........                                          [ 38%]
tests/test_fsevents.py ..                                                [ 40%]
tests/test_logging_event_handler.py .                                    [ 41%]
tests/test_observer.py ........                                          [ 51%]
tests/test_observers_api.py .......                                      [ 60%]
tests/test_observers_polling.py ..                                       [ 62%]
tests/test_pattern_matching_event_handler.py .....                       [ 69%]
tests/test_regex_matching_event_handler.py ......                        [ 76%]
tests/test_skip_repeats_queue.py ....s                                   [ 82%]
tests/test_snapshot_diff.py ............                                 [ 97%]
tests/test_watchmedo.py ..                                               [100%]
===Flaky Test Report===

test_delayed_get passed 1 out of the required 1 times. Success!
test_nondelayed_get passed 1 out of the required 1 times. Success!

===End Flaky Test Report===

======================= 61 passed, 23 skipped in 27.62s ========================

PyQt4 does build. If that could work, may be realistic.

samschott commented 8 months ago

Ohh, you mean watchdog tests, and not Maestral! Yeah, watchdog will pass, it's unfortunately a very leaky abstraction across file system notifications from different OS interfaces. There are significant differences is which types of events get surfaced, and what performance and manual indexing overhead is.

barracuda156 commented 8 months ago

@samschott I should run maestral tests indeed.