feat: Add Python paths module

This will be used in future commits to enable Python support
lipc-refactor
nirenjan 2026-04-22 12:12:21 -07:00
parent 3f4990de4d
commit 9aaec8b2f0
3 changed files with 23 additions and 0 deletions

View File

@ -102,6 +102,7 @@ dep_inih = dependency('inih')
includes = include_directories('include')
subdir('include')
subdir('python')
subdir('libx52')
subdir('libx52io')
subdir('libx52util')

15
python/meson.build 100644
View File

@ -0,0 +1,15 @@
# Generate the paths module so that the Python scripts work
# exactly the same as the C code.
path_data = configuration_data()
path_data.set('PREFIX', get_option('prefix'))
path_data.set('SYSCONFDIR', get_option('prefix') / get_option('sysconfdir'))
path_data.set('LOCALSTATEDIR', get_option('prefix') / get_option('localstatedir'))
path_data.set('DATADIR', get_option('prefix') / get_option('datadir'))
path_data.set('SOCK_PATH', get_option('prefix') / get_option('localstatedir') / 'run' / 'x52d' / 'x52d.cmd')
path_data_py = configure_file(
input: 'paths.py.in',
output: 'paths.py',
configuration: path_data
)

View File

@ -0,0 +1,7 @@
"""System paths defined at build time"""
PREFIX = "@PREFIX@"
SYSCONFDIR = "@SYSCONFDIR@"
LOCALSTATEDIR = "@LOCALSTATEDIR@"
DATADIR = "@DATADIR@"
SOCK_PATH = "@SOCK_PATH@"