build(python): updated all python bindings to reflect serif name

This commit is contained in:
2025-06-12 13:46:32 -04:00
parent 9c65301b21
commit 353e2072e7
9 changed files with 23 additions and 12 deletions

View File

@@ -1,2 +1,9 @@
hypre_sp = cmake.subproject('hypre') hypre_cpp_cmake_options = cmake.subproject_options()
hypre_cpp_cmake_options.add_cmake_defines({
'BUILD_SHARED_LIBS': 'ON',
})
hypre_sp = cmake.subproject(
'hypre',
options: hypre_cpp_cmake_options,
)
hypre_dep = hypre_sp.dependency('HYPRE') hypre_dep = hypre_sp.dependency('HYPRE')

View File

@@ -1,5 +1,10 @@
# Get the subproject object first # Get the subproject object first
opat_sub = subproject('opat-core') opat_sub = subproject(
'opat-core',
default_options: {
'generate_pc': false
}
)
# Get the dependency variable from that subproject # Get the dependency variable from that subproject
opatio_dep = opat_sub.get_variable('opatio_dep') opatio_dep = opat_sub.get_variable('opatio_dep')

View File

@@ -2,7 +2,7 @@
py_installation = import('python').find_installation('python3') py_installation = import('python').find_installation('python3')
py_mod = py_installation.extension_module( py_mod = py_installation.extension_module(
'fourdsse_bindings', # Name of the generated .so/.pyd file (without extension) 'serif', # Name of the generated .so/.pyd file (without extension)
sources: [ sources: [
meson.project_source_root() + '/src/python/bindings.cpp', meson.project_source_root() + '/src/python/bindings.cpp',
meson.project_source_root() + '/src/python/composition/bindings.cpp', meson.project_source_root() + '/src/python/composition/bindings.cpp',
@@ -18,5 +18,4 @@ py_mod = py_installation.extension_module(
], ],
cpp_args : ['-UNDEBUG'], # Example: Ensure assertions are enabled if needed cpp_args : ['-UNDEBUG'], # Example: Ensure assertions are enabled if needed
install : true, install : true,
subdir: 'fourdstar' # Optional: Install the module inside a 'fourdsse' Python package directory
) )

View File

@@ -7,8 +7,8 @@ requires = [
build-backend = "mesonpy" build-backend = "mesonpy"
[project] [project]
name = "fourdstar" # Choose your Python package name name = "serif" # Choose your Python package name
version = "0.1.0" # Your project's version version = "0.0.1a" # Your project's version
description = "Python interface for the 4DSSE C++ project" description = "Python interface for the 4DSSE C++ project"
readme = "Readme.md" readme = "Readme.md"
license = { file = "LICENSE.txt" } # Reference your license file [cite: 2] license = { file = "LICENSE.txt" } # Reference your license file [cite: 2]

View File

@@ -6,7 +6,7 @@ polyCoeff_headers = files(
'public/polyCoeff.h' 'public/polyCoeff.h'
) )
libPolyCoeff = static_library('polyCoeff', libPolyCoeff = shared_library('polyCoeff',
polyCoeff_sources, polyCoeff_sources,
include_directories : include_directories('./public'), include_directories : include_directories('./public'),
cpp_args: ['-fvisibility=default'], cpp_args: ['-fvisibility=default'],

View File

@@ -39,7 +39,7 @@ dependencies = [
types_dep, types_dep,
] ]
libPolySolver = static_library('polySolver', libPolySolver = shared_library('polySolver',
polySolver_sources, polySolver_sources,
include_directories : include_directories('./public'), include_directories : include_directories('./public'),
cpp_args: ['-fvisibility=default'], cpp_args: ['-fvisibility=default'],

View File

@@ -34,7 +34,7 @@ dependencies = [
mfemanalysis_dep, mfemanalysis_dep,
] ]
libpolyutils = library('polyutils', libpolyutils = shared_library('polyutils',
polyutils_sources, polyutils_sources,
include_directories : include_directories('./public'), include_directories : include_directories('./public'),
cpp_args: ['-fvisibility=default'], cpp_args: ['-fvisibility=default'],

View File

@@ -6,8 +6,8 @@
#include "composition/bindings.h" #include "composition/bindings.h"
#include "config/bindings.h" #include "config/bindings.h"
PYBIND11_MODULE(fourdsse_bindings, m) { PYBIND11_MODULE(serif, m) {
m.doc() = "Python bindings for the 4DSSE project"; m.doc() = "Python bindings for the SERiF project";
auto compMod = m.def_submodule("composition", "Composition-module bindings"); auto compMod = m.def_submodule("composition", "Composition-module bindings");
register_comp_bindings(compMod); register_comp_bindings(compMod);

View File

@@ -1,4 +1,4 @@
[wrap-git] [wrap-git]
url = https://github.com/4D-STAR/opat-core url = https://github.com/4D-STAR/opat-core
revision = 0.3.1a revision = 0.3.3a
depth = 1 depth = 1