Files
zoitechat/plugins/python/meson.build
deepend 3a680cf6b4 Updated the Python scripting shim to expose EAT_HEXCHAT as an alias of EAT_ZOITECHAT, so scripts written for HexChat constants work without changes.
Added a Python hexchat.py compatibility module and ensured it is installed alongside zoitechat.py/xchat.py, enabling import hexchat scripts to run.

Updated the Perl API layer to support HexChat naming by aliasing HexChat:: to ZoiteChat::, adding EAT_HEXCHAT to exported constants, and adding an explicit Perl shim module HexChat.pm.

Extended Perl XS constant registration to export EAT_HEXCHAT as a compatibility alias, and wired HexChat.pm into the embedded Perl module generation list so it ships with the plugin.
2026-02-23 19:09:09 -07:00

33 lines
1.0 KiB
Meson

python_opt = get_option('with-python')
if python_opt.startswith('python3')
# Python 3.8 introduced a new -embed variant
if not python_opt.endswith('-embed')
python_dep = dependency(python_opt + '-embed', version: '>= 3.3', required: false)
if not python_dep.found()
python_dep = dependency(python_opt, version: '>= 3.3')
endif
else
python_dep = dependency(python_opt, version: '>= 3.3')
endif
else
python_dep = dependency(python_opt, version: '>= 2.7')
endif
python3_source = custom_target('python-bindings',
input: ['../../src/common/zoitechat-plugin.h', 'python.py'],
output: 'python.c',
command: [find_program('generate_plugin.py'), '@INPUT@', '@OUTPUT@']
)
install_data(['_zoitechat.py', 'zoitechat.py', 'xchat.py', 'hexchat.py'],
install_dir: join_paths(get_option('libdir'), 'zoitechat/python')
)
shared_module('python', python3_source,
dependencies: [zoitechat_plugin_dep, python_dep],
install: true,
install_dir: plugindir,
name_prefix: '',
vs_module_defs: 'python.def'
)