diff --git a/meson.build b/meson.build index 3d82b01..888e2dc 100644 --- a/meson.build +++ b/meson.build @@ -1,6 +1,6 @@ project( 'primate', 'cpp', - version: run_command(['src/primate/__version__.py'], check: true).stdout().strip(), + version: run_command(['src' / 'primate' / '__version__.py'], check: true).stdout().strip(), license: 'Apache-2.0', meson_version: '>= 1.2.0', default_options : [ @@ -50,12 +50,12 @@ _cpp_args = compiler.get_supported_arguments( '-Wno-deprecated-anon-enum-enum-conversion' # to silence Eigen 3.4 warnings ) -## Debug only +## Debug build _cpp_args += compiler.get_supported_arguments( '-O2', # '-fsanitize=address', # '-fno-omit-frame-pointer', - '-DNDEBUG', + '-g', '-Wall' ) @@ -63,9 +63,9 @@ _cpp_args += compiler.get_supported_arguments( # _cpp_args += compiler.get_supported_arguments( # # '-flto=thin', # # '-flto', -# '-O3', -# '-DNDEBUG', -# '-Wl,-s', # strip +# '-O3', # full optimizations +# '-DNDEBUG', # remove assertions +# '-Wl,-s', # strip symbols to reduce binary size # # '-march=native' # either this or lto seems to not work on multiple builds # ) @@ -89,17 +89,16 @@ incdir_numpy = run_command(py, ['-c', 'import os; os.chdir(".."); import numpy; # incdir_imate = run_command(py, ['-c', 'import os; os.chdir(".."); import imate; print(imate.__path__[0])'], check : true).stdout().strip() # incdir_nanobind = run_command(py, ['-c', 'import os; os.chdir(".."); import nanobind; print(nanobind.include_dir())'], check : true).stdout().strip() incdir_pybind11 = run_command(py, ['-c', 'import os; os.chdir(".."); import pybind11; print(pybind11.get_include())'], check : true).stdout().strip() -incdir_combin = run_command(py, ['-c', 'import os; os.chdir(".."); import combin; print(combin.get_include())'], check : true).stdout().strip() +# incdir_combin = run_command(py, ['-c', 'import os; os.chdir(".."); import combin; print(combin.get_include())'], check : true).stdout().strip() ## Header includes inc_numpy = include_directories(incdir_numpy) inc_pybind11 = include_directories(incdir_pybind11) -inc_combin = include_directories(incdir_combin) +# inc_combin = include_directories(incdir_combin) # inc_nanobind = include_directories(incdir_nanobind) # nanobind.include_dir() inc_eigen = include_directories('extern' / 'eigen') # inc_eigen = include_directories(incdir_eigen) # inc_imate = include_directories(incdir_imate) -# inc_pkg = include_directories('include') ## Add dependencies, if they are available dependency_map = {} diff --git a/pyproject.toml b/pyproject.toml index bed2c97..89cc3a9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] build-backend = 'mesonpy' -requires = ['meson-python', 'wheel', 'ninja', 'pybind11', 'numpy'] # 'pythran-openblas' "cmake". nanobind +requires = ['meson-python', 'wheel', 'ninja', 'pybind11', 'numpy', 'combin'] # 'pythran-openblas' "cmake". nanobind [project] name = "scikit-primate" @@ -19,7 +19,8 @@ requires-python = ">=3.8" dependencies = [ "numpy", "scipy", - "more_itertools" + "more_itertools", + "combin" ] license = {file = "LICENSE"} include = [ diff --git a/src/primate/meson.build b/src/primate/meson.build index 7abe2cf..0f9bfac 100644 --- a/src/primate/meson.build +++ b/src/primate/meson.build @@ -11,7 +11,7 @@ foreach ext: extensions py.extension_module( ext, ext + '.cpp', - include_directories: [inc_pkg, inc_numpy, inc_eigen, inc_pybind11, inc_combin], # inc_pybind11, inc_nanobind + include_directories: [inc_pkg, inc_numpy, inc_eigen, inc_pybind11], # inc_pybind11, inc_nanobind dependencies: deps, install: true, cpp_args: _cpp_args