| 1 |
# Copyright (c) 2022-2025, PostgreSQL Global Development Group |
| 2 |
|
| 3 |
if not python3_dep.found() |
| 4 |
subdir_done() |
| 5 |
endif |
| 6 |
|
| 7 |
ltree_plpython_sources = files( |
| 8 |
'ltree_plpython.c', |
| 9 |
) |
| 10 |
|
| 11 |
if host_system == 'windows' |
| 12 |
ltree_plpython_sources += rc_lib_gen.process(win32ver_rc, extra_args: [ |
| 13 |
'--NAME', 'ltree_plpython3', |
| 14 |
'--FILEDESC', 'ltree_plpython - ltree transform for plpython',]) |
| 15 |
endif |
| 16 |
|
| 17 |
ltree_plpython = shared_module('ltree_plpython3', |
| 18 |
ltree_plpython_sources, |
| 19 |
include_directories: [plpython_inc, ltree_inc], |
| 20 |
c_args: ['-DPLPYTHON_LIBNAME="plpython3"'], |
| 21 |
kwargs: contrib_mod_args + { |
| 22 |
'dependencies': [python3_dep, contrib_mod_args['dependencies']], |
| 23 |
}, |
| 24 |
) |
| 25 |
contrib_targets += ltree_plpython |
| 26 |
|
| 27 |
install_data( |
| 28 |
'ltree_plpython3u--1.0.sql', |
| 29 |
'ltree_plpython3u.control', |
| 30 |
kwargs: contrib_data_args, |
| 31 |
) |
| 32 |
|
| 33 |
ltree_plpython_regress = [ |
| 34 |
'ltree_plpython' |
| 35 |
] |
| 36 |
|
| 37 |
tests += { |
| 38 |
'name': 'ltree_plpython', |
| 39 |
'sd': meson.current_source_dir(), |
| 40 |
'bd': meson.current_build_dir(), |
| 41 |
'regress': { |
| 42 |
'sql': ltree_plpython_regress, |
| 43 |
'regress_args': ['--load-extension=ltree'], |
| 44 |
}, |
| 45 |
} |