From cf8a574cd3847f2c4f758e20443180d485e06f6f Mon Sep 17 00:00:00 2001 From: munechika-koyo Date: Fri, 5 Dec 2025 01:08:47 +0100 Subject: [PATCH 01/12] Add Meson build configuration and source files for al-core library - Introduced meson.build files for project setup and library configuration. - Added options for building internal core library and dummy executable. - Included source files for HDF5 and UDA backends. - Configured public headers and installation paths. --- include/meson.build | 23 ++++++++++++ meson.build | 79 +++++++++++++++++++++++++++++++++++++++ meson_options.txt | 56 ++++++++++++++++++++++++++++ src/hdf5/meson.build | 20 ++++++++++ src/meson.build | 89 ++++++++++++++++++++++++++++++++++++++++++++ src/uda/meson.build | 42 +++++++++++++++++++++ 6 files changed, 309 insertions(+) create mode 100644 include/meson.build create mode 100644 meson.build create mode 100644 meson_options.txt create mode 100644 src/hdf5/meson.build create mode 100644 src/meson.build create mode 100644 src/uda/meson.build diff --git a/include/meson.build b/include/meson.build new file mode 100644 index 00000000..e97c447a --- /dev/null +++ b/include/meson.build @@ -0,0 +1,23 @@ +conf_data = configuration_data() +conf_data.set('PROJECT_VERSION', meson.project_version()) +al_defs_h = configure_file(input: 'al_defs.h.in', output: 'al_defs.h', configuration: conf_data) + +public_headers = files( + 'access_layer_base_plugin.h', + 'access_layer_plugin.h', + 'access_layer_plugin_manager.h', + 'al_backend.h', + 'al_const.h', + 'al_context.h', + 'al_exception.h', + 'al_lowlevel.h', + 'data_interpolation.h', + 'extended_access_layer_plugin.h', + 'provenance_plugin_feature.h', + 'readback_plugin_feature.h', + 'uri_parser.h', +) + al_defs_h + +# Include both source include directory and build include directory +public_includes = include_directories('.') +install_headers(public_headers, subdir: 'al_core') \ No newline at end of file diff --git a/meson.build b/meson.build new file mode 100644 index 00000000..36bcb27c --- /dev/null +++ b/meson.build @@ -0,0 +1,79 @@ +project( + 'imas-core', + ['c', 'cpp'], + license: 'LGPL-3.0-or-later', + meson_version: '>=0.60.0', + version: run_command('setuptools-scm', '--strip-dev', check: true).stdout().strip(), + default_options: [ + 'c_std=c17', + 'cpp_std=c++17', + 'buildtype=debugoptimized', + ], +) + +# ============================================================================= +# Compiler and System Setup +# ============================================================================= +cc = meson.get_compiler('c') +cxx = meson.get_compiler('cpp') +host_system = host_machine.system() +host_cpu = host_machine.cpu_family() + +# ============================================================================= +# Access Layer core (al-core) Library +# ============================================================================= +if get_option('al_core') + subdir('include') + subdir('src') +else + if get_option('al_dummy_exe') + al_core_dep = dependency('al-core', required: true) + endif +endif + +# ============================================================================= +# Dummy Executable for version printing +# ============================================================================= +if get_option('al_dummy_exe') + executable( + 'imas_print_version', + 'tests/imas_print_version.cpp', + dependencies: [al_core_dep], + install: true, + ) +endif + +# ============================================================================= +# Python Bindings (imas-core) +# ============================================================================= +if get_option('python_bindings') + subdir('python') +endif + +# +# MDSplus Models +# +if get_option('mdsplus_models') + warning('MDSplus models are not yet supported in Meson build system.') + # subdir('models/mdsplus') +endif + +# ============================================================================= +# Summary +# ============================================================================= +if get_option('al_core') + summary( + { + 'HDF5': get_option('al_backend_hdf5'), + 'UDA': get_option('al_backend_uda'), + 'MDSplus': get_option('al_backend_mdsplus'), + }, + section: 'Backends', + ) + summary( + { + 'C++ Arguments': al_core_cpp_args, + }, + section: 'Compiler Arguments', + ) +endif \ No newline at end of file diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 00000000..fc649b41 --- /dev/null +++ b/meson_options.txt @@ -0,0 +1,56 @@ +# ============================================================================= +# Libraries to build +# ============================================================================= + +option( + 'al_core', + type: 'boolean', + value: true, + description: 'Build internal core library, or use external installation', +) + +option( + 'al_dummy_exe', + type: 'boolean', + value: true, + description: 'Build dummy executable that prints version information.', +) + +option( + 'python_bindings', + type: 'boolean', + value: true, + description: 'Build Python wrapper', +) + +option( + 'mdsplus_models', + type: 'boolean', + value: false, + description: 'Build MDSplus models (requires MDSplus installation)', +) + +# ============================================================================= +# Backends Options +# ============================================================================= + +option( + 'al_backend_hdf5', + type: 'boolean', + value: true, + description: 'Enable HDF5 backend', +) + +option( + 'al_backend_uda', + type: 'boolean', + value: true, + description: 'Enable UDA backend', +) + +option( + 'al_backend_mdsplus', + type: 'boolean', + value: false, + description: 'Enable MDSplus backend', +) \ No newline at end of file diff --git a/src/hdf5/meson.build b/src/hdf5/meson.build new file mode 100644 index 00000000..7bd9d167 --- /dev/null +++ b/src/hdf5/meson.build @@ -0,0 +1,20 @@ +hdf5_backend_sources = files( + 'hdf5_backend.cpp', + 'hdf5_backend_factory.cpp', + 'hdf5_dataset_handler.cpp', + 'hdf5_events_handler.cpp', + 'hdf5_hs_selection_reader.cpp', + 'hdf5_hs_selection_writer.cpp', + 'hdf5_reader.cpp', + 'hdf5_utils.cpp', + 'hdf5_writer.cpp', +) + +private_includes += [include_directories('.')] + +core_deps += dependency('hdf5', language: 'c', required: true) + +al_core_cpp_args += '-DHDF5' + +# Add HDF5 backend sources +al_core_sources += hdf5_backend_sources \ No newline at end of file diff --git a/src/meson.build b/src/meson.build new file mode 100644 index 00000000..68bb1c3a --- /dev/null +++ b/src/meson.build @@ -0,0 +1,89 @@ +# AL-Core Library + +al_core_sources = files( + 'access_layer_plugin_manager.cpp', + 'al_backend.cpp', + 'al_const.cpp', + 'al_context.cpp', + 'al_exception.cpp', + 'al_lowlevel.cpp', + 'ascii_backend.cpp', + 'data_interpolation.cpp', + 'flexbuffers_backend.cpp', + 'memory_backend.cpp', + 'no_backend.cpp', +) + +private_includes = [include_directories('.')] + +# Enable ASCII backend +al_core_cpp_args = [ + '-DASCII', +] + +# ============================================================================= +# Dependencies +# ============================================================================= +boost_dep = dependency('boost', modules: ['filesystem'], required: false) +if not boost_dep.found() + boost_dep = cxx.find_library('boost_filesystem', required: true) +endif + +core_deps = [ + boost_dep, +] + +if host_system == 'windows' + core_deps += [ + dependency('threads', required: true), + dependency('dlfcn-win32', required: true), + ] +endif + +# ============================================================================= +# Add Optional Backends +# ============================================================================= +if get_option('al_backend_mdsplus') + warning('MDSplus backend is not yet supported in Meson build system.') + # subdir('mdsplus') +endif + +if get_option('al_backend_hdf5') + subdir('hdf5') +endif + +if get_option('al_backend_uda') + subdir('uda') +endif + +# ============================================================================= +# Library +# ============================================================================= +al_core = library( + 'al', + al_core_sources, + cpp_args: al_core_cpp_args, + include_directories: private_includes + public_includes, + dependencies: core_deps, + version: meson.project_version(), + install: true, +) + +# Declare dependency for other libraries to use +al_core_dep = declare_dependency( + link_with: al_core, + include_directories: public_includes, +) + +# ============================================================================= +# Package Configuration +# ============================================================================= +pkg = import('pkgconfig') +pkg.generate( + libraries: al_core, + subdirs: ['al_core'], + name: 'al-core', + description: 'IMAS Access Layer core libraries for C', + url: 'https://github.com/iterorganization/IMAS-Core', + version: meson.project_version(), +) \ No newline at end of file diff --git a/src/uda/meson.build b/src/uda/meson.build new file mode 100644 index 00000000..61a53e43 --- /dev/null +++ b/src/uda/meson.build @@ -0,0 +1,42 @@ +uda_backend_sources = files( + 'pugixml.cpp', + 'uda_backend.cpp', + 'uda_cache.cpp', + 'uda_path.cpp', + 'uda_xml.cpp', +) + +private_includes += [include_directories('.')] + +uda_client_dep = dependency('uda-client', required: false) +uda_cpp_dep = dependency('uda-cpp', required: false) + +uda_client_dep = dependency('uda-fat-client', required: false) +uda_fat_cpp_dep = dependency('uda-fat-cpp', required: false) + +if not uda_cpp_dep.found() and not uda_fat_cpp_dep.found() + error('UDA backend requested but UDA dependency not found.') +endif + +if uda_cpp_dep.found() + core_deps += [uda_cpp_dep, uda_client_dep] + if uda_cpp_dep.version() >= '2.7.6' + al_core_cpp_args += ['-DUDA', '-DUDA_LEGACY_276', '-DUDA_CLIENT_FLAGS_API'] + else + al_core_cpp_args += ['-DUDA'] + endif +endif + +if uda_fat_cpp_dep.found() + core_deps += [uda_fat_cpp_dep, uda_client_dep] + if uda_fat_cpp_dep.version() >= '2.7.6' + al_core_cpp_args += ['-DUDA', '-DUDA_LEGACY_276', '-DUDA_CLIENT_FLAGS_API'] + else + al_core_cpp_args += ['-DUDA'] + endif +endif + +# Add UDA backend sources if UDA dependency is found +if uda_cpp_dep.found() or uda_fat_cpp_dep.found() + al_core_sources += uda_backend_sources +endif \ No newline at end of file From a83d76a56098b55b16f418d513b4efe3d2ab1ed1 Mon Sep 17 00:00:00 2001 From: munechika-koyo Date: Fri, 5 Dec 2025 01:56:10 +0100 Subject: [PATCH 02/12] Update Meson version requirement and improve section formatting in meson.build --- meson.build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 36bcb27c..48de4a6d 100644 --- a/meson.build +++ b/meson.build @@ -2,7 +2,7 @@ project( 'imas-core', ['c', 'cpp'], license: 'LGPL-3.0-or-later', - meson_version: '>=0.60.0', + meson_version: '>=1.1.0', version: run_command('setuptools-scm', '--strip-dev', check: true).stdout().strip(), default_options: [ 'c_std=c17', @@ -50,9 +50,9 @@ if get_option('python_bindings') subdir('python') endif -# +# ============================================================================ # MDSplus Models -# +# ============================================================================ if get_option('mdsplus_models') warning('MDSplus models are not yet supported in Meson build system.') # subdir('models/mdsplus') From fb947cb401a46e99fcd257b8385f1e6a9aa4a2aa Mon Sep 17 00:00:00 2001 From: munechika-koyo Date: Fri, 5 Dec 2025 10:06:05 +0100 Subject: [PATCH 03/12] Refactor Meson build configuration to use external al-core installation and add option for building tests --- meson.build | 24 +++++++++++++++++++++--- meson_options.txt | 7 +++++++ 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 48de4a6d..06c00c84 100644 --- a/meson.build +++ b/meson.build @@ -26,9 +26,8 @@ if get_option('al_core') subdir('include') subdir('src') else - if get_option('al_dummy_exe') - al_core_dep = dependency('al-core', required: true) - endif + # Use external al-core installation + al_core_dep = dependency('al-core', required: true) endif # ============================================================================= @@ -43,6 +42,13 @@ if get_option('al_dummy_exe') ) endif +# ============================================================================ +# Test Low-level C API (al-core) +# ============================================================================ +if get_option('al_test') + # subdir('tests') # TODO: fix test sources +endif + # ============================================================================= # Python Bindings (imas-core) # ============================================================================= @@ -76,4 +82,16 @@ if get_option('al_core') }, section: 'Compiler Arguments', ) +endif + +if get_option('python_bindings') + summary( + { + 'Python Version': py.language_version(), + 'Python Path': py.full_path(), + 'Installed in': join_paths(py.get_install_dir(), 'imas_core'), + 'Cython Arguments': cython_args, + }, + section: 'Python Bindings', + ) endif \ No newline at end of file diff --git a/meson_options.txt b/meson_options.txt index fc649b41..e5aee591 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -16,6 +16,13 @@ option( description: 'Build dummy executable that prints version information.', ) +option( + 'al_test', + type: 'boolean', + value: false, + description: 'Build tests for al-core library', +) + option( 'python_bindings', type: 'boolean', From c7de00ba540c32e05a35d16ef112e74a1d50437e Mon Sep 17 00:00:00 2001 From: munechika-koyo Date: Fri, 5 Dec 2025 10:06:54 +0100 Subject: [PATCH 04/12] Add Meson build configuration for Python extension module --- python/meson.build | 49 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 python/meson.build diff --git a/python/meson.build b/python/meson.build new file mode 100644 index 00000000..aa076cab --- /dev/null +++ b/python/meson.build @@ -0,0 +1,49 @@ +add_languages('cython', native: false) + +# ============================================================================= +# Modules and Dependencies +# ============================================================================= +fs = import('fs') +py = import('python').find_installation(pure: false) +py_dep = py.dependency() +numpy_dep = dependency('numpy') + +cython_args = ['--annotate'] + +# ============================================================================= +# Source files +# ============================================================================= +py_files = files( + 'imas_core/__init__.py', + 'imas_core/exception.py', + 'imas_core/imasdef.py', +) +pyx_files = files( + 'imas_core/_al_lowlevel.pyx', + 'imas_core/al_defs.pyx', +) +pxd_files = files( + 'imas_core/al_defs.pxd', + 'imas_core/al_lowlevel_interface.pxd', +) + +# ============================================================================= +# Build Python Extension Module +# ============================================================================= +# compile cython +foreach pyx_file : pyx_files + py.extension_module( + fs.stem(pyx_file), + pyx_file, + cython_args: cython_args, + dependencies: [al_core_dep, py_dep, numpy_dep], + install: true, + subdir: 'imas_core', + ) +endforeach + +# Install pure python files +py.install_sources(py_files + pxd_files, subdir: 'imas_core') + +# ============================================================================= +# Version File \ No newline at end of file From 58407e0e00ec6e758232cf55b926d12f878a2a81 Mon Sep 17 00:00:00 2001 From: munechika-koyo Date: Fri, 5 Dec 2025 10:07:05 +0100 Subject: [PATCH 05/12] Add Meson build configuration for test executables --- tests/meson.build | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/meson.build diff --git a/tests/meson.build b/tests/meson.build new file mode 100644 index 00000000..1aece80d --- /dev/null +++ b/tests/meson.build @@ -0,0 +1,23 @@ +# Test executables for AL-Core + +# ============================================================================= +# Test executables +# ============================================================================= + +# C++ test executable +executable( + 'testlowlevel', + 'testlowlevel.cpp', + dependencies: [al_core_dep], + cpp_args: ['-DNOIMPLIB'], + install: true, +) + +# C test executable +executable( + 'testlowlevel_c', + 'testlowlevel_c.c', + dependencies: [al_core_dep], + c_args: ['-DNOIMPLIB'], + install: true, +) \ No newline at end of file From cf45462e5a8be0225f37d4ec60a729d8f77bd7b3 Mon Sep 17 00:00:00 2001 From: munechika-koyo Date: Fri, 5 Dec 2025 10:57:20 +0100 Subject: [PATCH 06/12] Fix version comparison syntax in Meson build configuration for UDA dependencies --- src/uda/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/uda/meson.build b/src/uda/meson.build index 61a53e43..33dab133 100644 --- a/src/uda/meson.build +++ b/src/uda/meson.build @@ -20,7 +20,7 @@ endif if uda_cpp_dep.found() core_deps += [uda_cpp_dep, uda_client_dep] - if uda_cpp_dep.version() >= '2.7.6' + if uda_cpp_dep.version().version_compare('>=2.7.6') al_core_cpp_args += ['-DUDA', '-DUDA_LEGACY_276', '-DUDA_CLIENT_FLAGS_API'] else al_core_cpp_args += ['-DUDA'] @@ -29,7 +29,7 @@ endif if uda_fat_cpp_dep.found() core_deps += [uda_fat_cpp_dep, uda_client_dep] - if uda_fat_cpp_dep.version() >= '2.7.6' + if uda_fat_cpp_dep.version().version_compare('>=2.7.6') al_core_cpp_args += ['-DUDA', '-DUDA_LEGACY_276', '-DUDA_CLIENT_FLAGS_API'] else al_core_cpp_args += ['-DUDA'] From 662586d266cce774c1ba459d796e7b7fd92eed2b Mon Sep 17 00:00:00 2001 From: munechika-koyo Date: Fri, 5 Dec 2025 11:04:43 +0100 Subject: [PATCH 07/12] Add versioning support in Meson build configuration and create _version.py --- python/_version.py.in | 31 +++++++++++++++++++++++++++++++ python/meson.build | 37 +++++++++++++++++++++++++++++++++---- 2 files changed, 64 insertions(+), 4 deletions(-) create mode 100644 python/_version.py.in diff --git a/python/_version.py.in b/python/_version.py.in new file mode 100644 index 00000000..de6f4d49 --- /dev/null +++ b/python/_version.py.in @@ -0,0 +1,31 @@ +__all__ = [ + "__version__", + "__version_tuple__", + "version", + "version_tuple", + "__commit_id__", + "commit_id", +] + +TYPE_CHECKING = False +if TYPE_CHECKING: + from typing import Tuple + from typing import Union + + VERSION_TUPLE = Tuple[Union[int, str], ...] + COMMIT_ID = Union[str, None] +else: + VERSION_TUPLE = object + COMMIT_ID = object + +version: str +__version__: str +__version_tuple__: VERSION_TUPLE +version_tuple: VERSION_TUPLE +commit_id: COMMIT_ID +__commit_id__: COMMIT_ID + +__version__ = version = "@VERSION@" +__version_tuple__ = version_tuple = @VERSION_TUPLE@ + +__commit_id__ = commit_id = "@COMMIT_ID@" diff --git a/python/meson.build b/python/meson.build index aa076cab..307fea1b 100644 --- a/python/meson.build +++ b/python/meson.build @@ -1,5 +1,37 @@ add_languages('cython', native: false) +# ============================================================================= +# Version File +# ============================================================================= +# Get version using setuptools-scm +version = run_command('setuptools-scm', check: true).stdout().strip() + +# Create tuple: split version like "5.5.2", ignoring dirty suffix etc. +split_ver = version.split('.') +ver_tuple = '(@0@, @1@, @2@)'.format( + split_ver[0], + split_ver[1], + split_ver[2], +) + +# Get commit id +git_commit = run_command('git', 'rev-parse', '--short', 'HEAD', check: false).stdout().strip() + +if git_commit == '' + git_commit = 'None' +endif + +# Generate _version.py +version_file = configure_file( + input: '_version.py.in', + output: '_version.py', + configuration: { + 'VERSION': version, + 'VERSION_TUPLE': ver_tuple, + 'COMMIT_ID': git_commit, + }, +) + # ============================================================================= # Modules and Dependencies # ============================================================================= @@ -43,7 +75,4 @@ foreach pyx_file : pyx_files endforeach # Install pure python files -py.install_sources(py_files + pxd_files, subdir: 'imas_core') - -# ============================================================================= -# Version File \ No newline at end of file +py.install_sources(py_files + pxd_files + version_file, subdir: 'imas_core') \ No newline at end of file From 06b19225d1e1afa7b97859f3e6487f9d83692cf2 Mon Sep 17 00:00:00 2001 From: munechika-koyo Date: Fri, 5 Dec 2025 15:00:37 +0100 Subject: [PATCH 08/12] Update Meson build configuration add test cases for lowlevel executables and modify dummy executable option --- meson.build | 6 +++--- meson_options.txt | 2 +- python/meson.build | 2 +- tests/meson.build | 10 +++++++--- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/meson.build b/meson.build index 06c00c84..98dcade4 100644 --- a/meson.build +++ b/meson.build @@ -34,12 +34,13 @@ endif # Dummy Executable for version printing # ============================================================================= if get_option('al_dummy_exe') - executable( + imas_print_version = executable( 'imas_print_version', 'tests/imas_print_version.cpp', dependencies: [al_core_dep], install: true, ) + test('imas_print_version_test', imas_print_version) endif # ============================================================================ @@ -88,8 +89,7 @@ if get_option('python_bindings') summary( { 'Python Version': py.language_version(), - 'Python Path': py.full_path(), - 'Installed in': join_paths(py.get_install_dir(), 'imas_core'), + 'Buildtime Python Path': py.full_path(), 'Cython Arguments': cython_args, }, section: 'Python Bindings', diff --git a/meson_options.txt b/meson_options.txt index e5aee591..121be22d 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -12,7 +12,7 @@ option( option( 'al_dummy_exe', type: 'boolean', - value: true, + value: false, description: 'Build dummy executable that prints version information.', ) diff --git a/python/meson.build b/python/meson.build index 307fea1b..2d13345a 100644 --- a/python/meson.build +++ b/python/meson.build @@ -37,7 +37,7 @@ version_file = configure_file( # ============================================================================= fs = import('fs') py = import('python').find_installation(pure: false) -py_dep = py.dependency() +py_dep = dependency('python3', native: false) numpy_dep = dependency('numpy') cython_args = ['--annotate'] diff --git a/tests/meson.build b/tests/meson.build index 1aece80d..5a15e68d 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -5,7 +5,7 @@ # ============================================================================= # C++ test executable -executable( +testlowlevel = executable( 'testlowlevel', 'testlowlevel.cpp', dependencies: [al_core_dep], @@ -14,10 +14,14 @@ executable( ) # C test executable -executable( +testlowlevel_c = executable( 'testlowlevel_c', 'testlowlevel_c.c', dependencies: [al_core_dep], c_args: ['-DNOIMPLIB'], install: true, -) \ No newline at end of file +) + +# Test cases +test('Test lowlevel C++', testlowlevel) +test('Test lowlevel C', testlowlevel_c) \ No newline at end of file From e5fe0e21180b16d12c22455a16615ac8d4ccd5e4 Mon Sep 17 00:00:00 2001 From: munechika-koyo Date: Fri, 5 Dec 2025 15:06:43 +0100 Subject: [PATCH 09/12] Format comment bars --- meson.build | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 98dcade4..d88f7dec 100644 --- a/meson.build +++ b/meson.build @@ -43,9 +43,9 @@ if get_option('al_dummy_exe') test('imas_print_version_test', imas_print_version) endif -# ============================================================================ +# ============================================================================= # Test Low-level C API (al-core) -# ============================================================================ +# ============================================================================= if get_option('al_test') # subdir('tests') # TODO: fix test sources endif @@ -57,9 +57,9 @@ if get_option('python_bindings') subdir('python') endif -# ============================================================================ +# ============================================================================= # MDSplus Models -# ============================================================================ +# ============================================================================= if get_option('mdsplus_models') warning('MDSplus models are not yet supported in Meson build system.') # subdir('models/mdsplus') From fbc8419c71b0be6655c1d14e19e15ac0312b7c58 Mon Sep 17 00:00:00 2001 From: Koyo MUNECHIKA Date: Tue, 9 Dec 2025 12:09:01 +0100 Subject: [PATCH 10/12] Update version retrieval command in Meson build configuration to use 'python -m setuptools_scm' --- meson.build | 5 ++++- python/meson.build | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index d88f7dec..7b8f343a 100644 --- a/meson.build +++ b/meson.build @@ -3,7 +3,10 @@ project( ['c', 'cpp'], license: 'LGPL-3.0-or-later', meson_version: '>=1.1.0', - version: run_command('setuptools-scm', '--strip-dev', check: true).stdout().strip(), + version: run_command( + 'python', '-m', 'setuptools_scm', '--strip-dev', + check: true + ).stdout().strip(), default_options: [ 'c_std=c17', 'cpp_std=c++17', diff --git a/python/meson.build b/python/meson.build index 2d13345a..cf40858f 100644 --- a/python/meson.build +++ b/python/meson.build @@ -4,7 +4,7 @@ add_languages('cython', native: false) # Version File # ============================================================================= # Get version using setuptools-scm -version = run_command('setuptools-scm', check: true).stdout().strip() +version = run_command('python', '-m', 'setuptools_scm', check: true).stdout().strip() # Create tuple: split version like "5.5.2", ignoring dirty suffix etc. split_ver = version.split('.') From 5e9b832067020232634a4bd955614f2686c5d5f7 Mon Sep 17 00:00:00 2001 From: Koyo MUNECHIKA Date: Tue, 9 Dec 2025 12:12:01 +0100 Subject: [PATCH 11/12] Fix variable name for UDA fat client dependency in Meson build configuration --- src/uda/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/uda/meson.build b/src/uda/meson.build index 33dab133..b830c626 100644 --- a/src/uda/meson.build +++ b/src/uda/meson.build @@ -11,7 +11,7 @@ private_includes += [include_directories('.')] uda_client_dep = dependency('uda-client', required: false) uda_cpp_dep = dependency('uda-cpp', required: false) -uda_client_dep = dependency('uda-fat-client', required: false) +uda_fat_client_dep = dependency('uda-fat-client', required: false) uda_fat_cpp_dep = dependency('uda-fat-cpp', required: false) if not uda_cpp_dep.found() and not uda_fat_cpp_dep.found() @@ -28,7 +28,7 @@ if uda_cpp_dep.found() endif if uda_fat_cpp_dep.found() - core_deps += [uda_fat_cpp_dep, uda_client_dep] + core_deps += [uda_fat_cpp_dep, uda_fat_client_dep] if uda_fat_cpp_dep.version().version_compare('>=2.7.6') al_core_cpp_args += ['-DUDA', '-DUDA_LEGACY_276', '-DUDA_CLIENT_FLAGS_API'] else From 0b4a3808986623ceb5706479770d9a26be8121f7 Mon Sep 17 00:00:00 2001 From: Koyo MUNECHIKA Date: Thu, 11 Dec 2025 14:38:57 +0100 Subject: [PATCH 12/12] Replace Windows thread dependency with pthreads and update dlfcn-win32 dependency method in Meson build configuration --- src/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/meson.build b/src/meson.build index 68bb1c3a..0b74ea9b 100644 --- a/src/meson.build +++ b/src/meson.build @@ -35,8 +35,8 @@ core_deps = [ if host_system == 'windows' core_deps += [ - dependency('threads', required: true), - dependency('dlfcn-win32', required: true), + cxx.find_library('pthreads', required: true), + dependency('dlfcn-win32', modules: ['dlfcn-win32::dl'], method: 'cmake', required: true), ] endif