diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 13:44:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 13:44:03 +0000 |
commit | 293913568e6a7a86fd1479e1cff8e2ecb58d6568 (patch) | |
tree | fc3b469a3ec5ab71b36ea97cc7aaddb838423a0c /src/pl/plpython/meson.build | |
parent | Initial commit. (diff) | |
download | postgresql-16-293913568e6a7a86fd1479e1cff8e2ecb58d6568.tar.xz postgresql-16-293913568e6a7a86fd1479e1cff8e2ecb58d6568.zip |
Adding upstream version 16.2.upstream/16.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/pl/plpython/meson.build')
-rw-r--r-- | src/pl/plpython/meson.build | 109 |
1 files changed, 109 insertions, 0 deletions
diff --git a/src/pl/plpython/meson.build b/src/pl/plpython/meson.build new file mode 100644 index 0000000..98b7d7c --- /dev/null +++ b/src/pl/plpython/meson.build @@ -0,0 +1,109 @@ +# Copyright (c) 2022-2023, PostgreSQL Global Development Group + +if not python3_dep.found() + subdir_done() +endif + +plpython_sources = files( + 'plpy_cursorobject.c', + 'plpy_elog.c', + 'plpy_exec.c', + 'plpy_main.c', + 'plpy_planobject.c', + 'plpy_plpymodule.c', + 'plpy_procedure.c', + 'plpy_resultobject.c', + 'plpy_spi.c', + 'plpy_subxactobject.c', + 'plpy_typeio.c', + 'plpy_util.c', +) + +plpython_sources += custom_target('spiexceptions.h', + input: files('../../backend/utils/errcodes.txt'), + output: 'spiexceptions.h', + command: [perl, files('generate-spiexceptions.pl'), '@INPUT@'], + capture: true, +) + + +# FIXME: need to duplicate import library ugliness? +plpython_inc = include_directories('.') + +if host_system == 'windows' + plpython_sources += rc_lib_gen.process(win32ver_rc, extra_args: [ + '--NAME', 'plpython3', + '--FILEDESC', 'PL/Python - procedural language',]) +endif + +plpython = shared_module('plpython3', + plpython_sources, + c_pch: pch_postgres_h, + include_directories: [plpython_inc, postgres_inc], + kwargs: pg_mod_args + { + 'dependencies': [python3_dep, pg_mod_args['dependencies']], + }, +) +pl_targets += plpython + +# FIXME: Only install the relevant versions +install_data( + 'plpython3u.control', + 'plpython3u--1.0.sql', + install_dir: dir_data_extension, +) + +install_headers( + 'plpy_cursorobject.h', + 'plpy_elog.h', + 'plpy_exec.h', + 'plpy_main.h', + 'plpy_planobject.h', + 'plpy_plpymodule.h', + 'plpy_procedure.h', + 'plpy_resultobject.h', + 'plpy_spi.h', + 'plpy_subxactobject.h', + 'plpy_typeio.h', + 'plpy_util.h', + 'plpython.h', + 'plpython_system.h', + install_dir: dir_include_server, +) + +plpython_regress = [ + 'plpython_schema', + 'plpython_populate', + 'plpython_test', + 'plpython_do', + 'plpython_global', + 'plpython_import', + 'plpython_spi', + 'plpython_newline', + 'plpython_void', + 'plpython_call', + 'plpython_params', + 'plpython_setof', + 'plpython_record', + 'plpython_trigger', + 'plpython_types', + 'plpython_error', + 'plpython_ereport', + 'plpython_unicode', + 'plpython_quote', + 'plpython_composite', + 'plpython_subtransaction', + 'plpython_transaction', + 'plpython_drop', +] + +tests += { + 'name': 'plpython', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'regress': { + 'sql': plpython_regress, + }, +} + +subdir('po', if_found: libintl) |