Gimp/plug-ins/python/meson.build
Jacob Boerema 3478e1c00f plug-ins: add file-plug-in testing framework
Copied over from the original separate work in:
https://gitlab.gnome.org/Wormnest/gimp-file-plugin-tests
After that further improved and changed and added more file format
tests.

Added meson.build files to integrate it in our build, but we do not
install it for releases.
2024-04-26 12:28:47 -04:00

54 lines
1.6 KiB
Meson

plugins = [
{ 'name': 'colorxhtml' },
{ 'name': 'file-openraster' },
{ 'name': 'foggify' },
{ 'name': 'gradients-save-as-css' },
{ 'name': 'histogram-export' },
{ 'name': 'palette-offset' },
{ 'name': 'palette-sort' },
{ 'name': 'palette-to-gradient' },
{ 'name': 'python-eval' },
{ 'name': 'spyro-plus' },
]
if not stable or not release
plugins += [
{ 'name': 'test-dialog' },
]
endif
subdir('python-console')
subdir('tests')
foreach plugin : plugins
name = plugin.get('name')
srcs = plugin.get('srcs', [name + '.py'])
if have_python
install_data(srcs, install_dir: gimpplugindir / 'plug-ins' / name,
install_mode: 'rwxr-xr-x')
endif
foreach src : srcs
# Ugly trick to copy Python plug-ins into subfolders so that we can run GIMP
# from the build directory without installing it.
# To be run even if we don't install Python plug-ins so that we can
# still run them for in-build scripts.
run_command(python, meson.project_source_root() / '.gitlab/cp-plug-in-subfolder.py',
meson.current_source_dir() / src, meson.current_build_dir() / name, check: true)
endforeach
endforeach
if have_python
# Fallback fix to the problem of non-configured interpreters
if platform_windows and not meson.is_cross_build() and python.found()
python_config = configuration_data()
python_config.set('PYTHON_PATH', '')
configure_file(input : 'pygimp.interp.in',
output: 'pygimp.interp',
configuration: python_config,
install: true,
install_dir: gimpplugindir / 'interpreters')
endif
endif