jwilk / didjvu

DjVu encoder with foreground/background separation
https://jwilk.net/software/didjvu
GNU General Public License v2.0
10 stars 8 forks source link

I'm not able to find the right distribution and packages that will make all xmp-tests run Ok on Python2.7 #22

Closed rmast closed 2 years ago

rmast commented 2 years ago

During the migration to Python3.10 I have no clue what those XMP-functionalities do. I saw Jakub to recently fix some tests for one of the XMP-possibilities, but my install just complains about some modules not installed.

What XMP-possibilities should be availabe in a new Python3.10 version, and with what Linux distribution and installing what packages/steps can I see the original tests complete with Python2.7?

FriedrichFroebel commented 2 years ago

According to the README:

  1. GExiv2 (≥ 0.10.3) + PyGI or
  2. python-xmp-toolkit or
  3. pyexiv2 (≥ 0.3)

Judging from the CI definition, this should be satisfied using the following commands:

  1. sudo apt-get install python-gi gir1.2-gexiv2-0.10
  2. sudo apt-get install libexempi[38] && python -m pip install python-xmp-toolkit, see https://python-xmp-toolkit.readthedocs.io/en/latest/installation.html as well.
  3. sudo apt-get install libboost-python-dev libexiv2-dev && python -m pip install --verbose git+https://github.com/escaped/pyexiv2.
jwilk commented 2 years ago

The packages mentioned by README and by @FriedrichFroebel are needed to run didjvu. Apart from that, the tests themselves use python-xml-toolkit (regardless of which backend is being tested) and the Exiv2 command line tool (sudo apt-get install exiv2).

jwilk commented 2 years ago

I couldn't get the pyexiv2 backend work on CI:

To be fair, I didn't try very hard; but I doubt there any users of that backend left. It's probably time to drop it. pyexiv2 has been deprecated upstream for nearly a decade.

jwilk commented 2 years ago

The GExiv2 backend is what's work best. The reason the other backends exist is that when that code was added back in 2015, some distros I wanted to support didn't have a sufficiently new version of GExiv2.

rmast commented 2 years ago

Ok, the test_xmp run fine now on Python2.7, except for the mentioned pyexiv2:

tests.test_xmp.test_metadata.test_empty(gexiv2_backend, exiv2_checker) ... ok
tests.test_xmp.test_metadata.test_empty(gexiv2_backend, libxmp_checker) ... ok
tests.test_xmp.test_metadata.test_empty(libxmp_backend, exiv2_checker) ... ok
tests.test_xmp.test_metadata.test_empty(libxmp_backend, libxmp_checker) ... ok
tests.test_xmp.test_metadata.test_empty(pyexiv2_backend, exiv2_checker) ... ok
tests.test_xmp.test_metadata.test_empty(pyexiv2_backend, libxmp_checker) ... ok
tests.test_xmp.test_metadata.test_io_error(gexiv2_backend,) ... ok
tests.test_xmp.test_metadata.test_io_error(libxmp_backend,) ... ok
tests.test_xmp.test_metadata.test_io_error(pyexiv2_backend,) ... ok
tests.test_xmp.test_metadata.test_new(gexiv2_backend, exiv2_checker) ... ok
tests.test_xmp.test_metadata.test_new(gexiv2_backend, libxmp_checker) ... ok
tests.test_xmp.test_metadata.test_new(libxmp_backend, exiv2_checker) ... ok
tests.test_xmp.test_metadata.test_new(libxmp_backend, libxmp_checker) ... ok
tests.test_xmp.test_metadata.test_new(pyexiv2_backend, exiv2_checker) ... FAIL
tests.test_xmp.test_metadata.test_new(pyexiv2_backend, libxmp_checker) ... FAIL
tests.test_xmp.test_metadata.test_updated(gexiv2_backend, exiv2_checker) ... ok
tests.test_xmp.test_metadata.test_updated(gexiv2_backend, libxmp_checker) ... ok
tests.test_xmp.test_metadata.test_updated(libxmp_backend, exiv2_checker) ... ok
tests.test_xmp.test_metadata.test_updated(libxmp_backend, libxmp_checker) ... ok
tests.test_xmp.test_metadata.test_updated(pyexiv2_backend, exiv2_checker) ... FAIL
tests.test_xmp.test_metadata.test_updated(pyexiv2_backend, libxmp_checker) ... FAIL

I had to pip install pillow over python-pil, which gave this error: https://github.com/python-pillow/Pillow/issues/2926

rmast commented 2 years ago

I collected these statements for Ubuntu 18.04/Python2.7:

sudo apt-get install python-gi gir1.2-gexiv2-0.10
sudo apt-get install libexempi[38] && python -m pip install python-xmp-toolkit
sudo apt-get install libboost-python-dev libexiv2-dev
sudo apt-get install python-gamera libpng-dev libtiff-dev python-nose git build-essential python-pip libboost-python-dev libexiv2-dev djvulibre-bin exiv2
pip install --verbose git+https://github.com/escaped/pyexiv2
pip install pillow
rmast commented 2 years ago

To be fair, I didn't try very hard; but I doubt there any users of that backend left. It's probably time to drop it. pyexiv2 has been deprecated upstream for nearly a decade.

There appears to be a successor: https://python3-exiv2.readthedocs.io/en/latest/

Don't know if it's worth migration though.