PDFMasher dependencies

I’m trying to install PDFMasher, an unmaintained, but still one-of-a-kind program in terms of functionality - it used to be perfect in stripping pdfs of articles of all the paratext and then converting them to epub/mobi files. It’s unmaintained on github but I cloned it, hoping I can get it to work. When I try to run the install script included in the repo, it returns

PyQt 4.8+ required. Install it and try again. Aborting

When I try to install it using pip, it returns

Requirement already satisfied: pyqt5 in /usr/lib/python3.10/site-packages (5.15.7)
Requirement already satisfied: PyQt5-sip<13,>=12.11 in /usr/lib/python3.10/site-packages (from pyqt5) (12.11.0)

How can I get PyQt4.8+? Has anyone successfully installed pdfmasher on their system? I need this program, badly.

Thank you for any help or advice.

Eh…another sudo pip…

1 Like

Care to elaborate? Not sure I understand.

Not sure if this will help, but python-pyqt4 4.12.3-5 is available in the AUR.

Never use pip with sudo. It’s meant to be run with user privileges only.

1 Like

Learn something every day. Hope I didn’t mess up anything with my system!

This moved it along. But building the package stopped with the following:

Traceback (most recent call last):
  File "/home/***/pdfmasher/hscommon/build.py", line 278, in iter_by_three
    version = next(it)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/***/pdfmasher/./build.py", line 180, in <module>
  File "/home/***/pdfmasher/./build.py", line 177, in main
    build_normal(ui, dev)
  File "/home/***/pdfmasher/./build.py", line 146, in build_normal
  File "/home/***/pdfmasher/./build.py", line 143, in build_help
    sphinxgen.gen(help_basepath, help_destpath, changelog_path, tixurl, confrepl, confpath)
  File "/home/***/pdfmasher/hscommon/sphinxgen.py", line 47, in gen
    changelog = read_changelog_file(changelogpath)
  File "/home/***/pdfmasher/hscommon/build.py", line 288, in read_changelog_file
    for version, date_str, description in iter_by_three(iter(splitted)):
RuntimeError: generator raised StopIteration

A quick guess would be the changelog is not formatted as expected.

I ended up going with the windows version over wine. Does the trick, and I didn’t know how to proceed with the failed build. If anyone reading this has suggestions for alternatives, I’d welcome that!