Skip to content

Commit

Permalink
Fixes for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
peekxc committed Feb 16, 2024
1 parent aa448b3 commit 624b6a1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
17 changes: 8 additions & 9 deletions meson.build
Original file line number Diff line number Diff line change
@@ -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 : [
Expand Down Expand Up @@ -50,22 +50,22 @@ _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'
)

## Release only
# _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
# )

Expand All @@ -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 = {}
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -19,7 +19,8 @@ requires-python = ">=3.8"
dependencies = [
"numpy",
"scipy",
"more_itertools"
"more_itertools",
"combin"
]
license = {file = "LICENSE"}
include = [
Expand Down
2 changes: 1 addition & 1 deletion src/primate/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 624b6a1

Please sign in to comment.