isosphere / KoHighlights

KOHighlights is a utility for viewing KOReader's highlights and/or export them to simple text, html, csv or markdown files.
MIT License
1 stars 0 forks source link

Switch to Poetry for Dependency Management #2

Closed isosphere closed 10 months ago

isosphere commented 10 months ago

We're currently using a requirements.txt file - these do not scale well. Virtual environment systems offer a self-contained Python environment for development and building which is less prone to issues.

Unfortunately our PySide dependency hasn't been updated in 8 years and is holding everything else back with an implicit Python 3.4 maximum version limit - 3.12 is current.

isosphere commented 10 months ago

PySide 2 is now PySide 6: https://wiki.qt.io/Qt_for_Python

I've solved for this dependency in d8dbb6f2c6b2dc5d96dbfc2e7aba82948a86fb01 but have not looked for and corrected any API changes.

this document should help.

isosphere commented 10 months ago

I can't regenerate images_rc.py, because most of the resources images.grc refers to don't exist.

isosphere commented 10 months ago

This is working, but needs to be tested:

isosphere commented 10 months ago

I can't regenerate images_rc.py, because most of the resources images.grc refers to don't exist.

This has been resolved by 7a4a40abb125fd48dd2caab664a542538d607bb7 upstream.

isosphere commented 10 months ago

With the requirements mentioned in the latest commit, the application runs on Debian bookworm on an amd64 system: it opens, and closes, without issue. No further testing has been done as of this writing.

Discovering the required dependencies proceeded like this:

  1. Attempt to python3 test.py, where test.py is a basic, do-nothing PySide6 application
  2. Examine any error about plugins: if "qxcb" fails to load, note that
  3. Use ldd on the appropriate plugin platform .so file; for qxcb, that's lib/python3.11/site-packages/PySide6/Qt/plugins/platforms/libqxcb.so
  4. Note the missing library dependencies and find packages that install them (the apt-file package is great for this on Debian)
  5. Install them
  6. Return to step 1
isosphere commented 10 months ago

Highlight exploring and exporting is working on Debian Linux.

The archive feature appears to work fine on Debian Linux and Windows.

Apple platforms remain untested, but I will leave that to others.