Skip to content

Python as checkdepends (or optdepends)

I think that python may not actually be a mandatory dependency for this package. Here are a few reasons why:

  • its README.md doesn't mention python as a dependency;
  • looking for dependencies from other distros shows no trace of python (e.g., Debian, Alpine);
  • building in a clean chroot without python succeeds;
  • running meson test -C build succeeds;

However, I'd say that we should add the check() function. I have already developed one (see below) and it seems that the package comes with two suits of tests, one of which requires pip and pytest.

checkdepends=('python-pip' 'python-pytest')

check() {
  export LD_LIBRARY_PATH="$srcdir/build/libvips"
  meson test -C build
  pip install pyvips[test] --break-system-packages
  pytest -k "not test_text" -sv --log-cli-level=WARNING vips-$pkgver/test/test-suite
}

I was thinking of contributing two separate patches, one for removing the python dependency and a second one to add check() and checkdepends. I would contribute the second one after the first one to avoid merge conflicts. Let me know what you think!

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information