summary refs log tree commit diff stats
path: root/plugins/python/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/python/meson.build')
-rw-r--r--plugins/python/meson.build14
1 files changed, 12 insertions, 2 deletions
diff --git a/plugins/python/meson.build b/plugins/python/meson.build
index e24f0c6f..2ad5128e 100644
--- a/plugins/python/meson.build
+++ b/plugins/python/meson.build
@@ -5,8 +5,18 @@ else
   python_dep = dependency(python_opt, version: '>= 2.7')
 endif
 
-shared_module('python', 'python.c',
-  dependencies: [libgio_dep, hexchat_plugin_dep, python_dep],
+python3_source = custom_target('python-bindings',
+  input: ['../../src/common/hexchat-plugin.h', 'python.py'],
+  output: 'python.c',
+  command: [find_program('generate_plugin.py'), '@INPUT@', '@OUTPUT@']
+)
+
+install_data(['_hexchat.py', 'hexchat.py', 'xchat.py'],
+  install_dir: join_paths(get_option('libdir'), 'hexchat/python')
+)
+
+shared_module('python', python3_source,
+  dependencies: [hexchat_plugin_dep, python_dep],
   install: true,
   install_dir: plugindir,
   name_prefix: '',