OCRmyPDF icon indicating copy to clipboard operation
OCRmyPDF copied to clipboard

[Bug]: --version gives 0.0.0 on Ubuntu snap

Open pseudomonas opened this issue 2 years ago • 5 comments

What were you trying to do?

This is odd.

$ snap install ocrmypdf
ocrmypdf v15.1.0+git8.2b0e1498 from James Barlow (shael7aerien) installed
$ ocrmypdf --version
0.0.0
$ which ocrmypdf 
/snap/bin/ocrmypdf
$ ocrmypdf --version
[…copious help text as normal…]

Where are you installing from?

Ubuntu snap

What operating system are you working on?

Linux

Relevant log output

No response

pseudomonas avatar Oct 21 '23 19:10 pseudomonas

ocrmypdf uses setuptools-scm, which derives the version from git tags. The version is then copied into virtual environment and retrieved using importlib.metadata.version('ocrmypdf'). I assume this means snapcraft is hacking virtual environments somehow....

jbarlow83 avatar Oct 21 '23 23:10 jbarlow83

Also snap had a problem finding ghostscript's config and stuff (I can't give you a decent error message because I just swore at snap's habitual inability to play nicely with non-snap software, removed it, installed ocrmypdf via pip and never looked back)

pseudomonas avatar Oct 23 '23 18:10 pseudomonas

You probably mean #1167. Yeah, it's not that cooperative.

I'm firmly on team flatpak personally and added the snap because others contributed it by PR... I might just discontinue it or replace with flatpak if it continues to be a hassle.

jbarlow83 avatar Oct 23 '23 19:10 jbarlow83

Actually what would be awesome would be a PPA with an up-to-date .deb; the apt for LTS Ubuntu is ancient.

pseudomonas avatar Oct 23 '23 19:10 pseudomonas

Flatpak has "You configured your second hard drive to be mounted on /storage but I'm not going to touch that because it's not /home/something" problems and I know there's a dance you can do to fix it but it's a PITA.

pseudomonas avatar Oct 23 '23 19:10 pseudomonas