1 # Copyright (c) 2022-2024, PostgreSQL Global Development Group
3 if not python3_dep.found()
7 plpython_sources = files(
15 'plpy_resultobject.c',
17 'plpy_subxactobject.c',
22 plpython_sources += custom_target('spiexceptions.h',
23 input: files('../../backend/utils/errcodes.txt'),
24 output: 'spiexceptions.h',
25 command: [perl, files('generate-spiexceptions.pl'), '@INPUT@'],
30 # FIXME: need to duplicate import library ugliness?
31 plpython_inc = include_directories('.')
33 if host_system == 'windows'
34 plpython_sources += rc_lib_gen.process(win32ver_rc, extra_args: [
35 '--NAME', 'plpython3',
36 '--FILEDESC', 'PL/Python - procedural language',])
39 plpython = shared_module('plpython3',
41 c_pch: pch_postgres_h,
42 include_directories: [plpython_inc, postgres_inc],
43 kwargs: pg_mod_args + {
44 'dependencies': [python3_dep, pg_mod_args['dependencies']],
47 pl_targets += plpython
49 # FIXME: Only install the relevant versions
52 'plpython3u--1.0.sql',
53 install_dir: dir_data_extension,
57 'plpy_cursorobject.h',
64 'plpy_resultobject.h',
66 'plpy_subxactobject.h',
71 install_dir: dir_include_server,
95 'plpython_subtransaction',
96 'plpython_transaction',
102 'sd': meson.current_source_dir(),
103 'bd': meson.current_build_dir(),
105 'sql': plpython_regress,
109 subdir('po', if_found: libintl)