Skip to content

Commit

Permalink
Merge branch 'ankith26-gsoc' of https://github.com/ankith26/PyElastica
Browse files Browse the repository at this point in the history
…into ankith26-gsoc
  • Loading branch information
skim0119 committed Jul 13, 2024
2 parents d92a09c + 63b1c27 commit 80dae52
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 6 deletions.
12 changes: 12 additions & 0 deletions backend/buildscripts/build-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,16 @@ if [ ! -d sleef ]; then
cd ..
fi

# brigand
if [ ! -d brigand ]; then
git clone --depth 1 https://github.com/edouarda/brigand.git && cd brigand

mkdir build
cmake -B build $ELASTICA_BASE_CMAKE_FLAGS \
-S .
cmake --build build --parallel $(nproc)
cmake --install build
cd ..
fi

cd $OLD_CWD
9 changes: 8 additions & 1 deletion backend/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ pybind11_dep = declare_dependency(
).stdout().strip(),
)

# python and pybind deps are used together
py_deps = [py_dep, pybind11_dep]

fs = import('fs')

message('Running buildscripts/build-all.sh (might take a while)')
Expand Down Expand Up @@ -93,7 +96,11 @@ endif
# blaze and deps commonly used together
blaze_deps = [blaze_dep, blaze_tensor_dep, sleef_dep]

brigand_dep = dependency('brigand', fallback : 'brigand')
brigand_dep = dependency('brigand', required: false)
if not brigand_dep.found()
brigand_dep = declare_dependency(include_directories: deps_inc_dirs)
endif

cxxopts_dep = dependency('cxxopts', fallback : 'cxxopts')

# meson-python: error: Could not map installation path to an equivalent wheel directory:
Expand Down
10 changes: 5 additions & 5 deletions backend/src/meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
example_1 = py.extension_module(
'example_1',
sources: ['example_1.cpp'],
dependencies: [py_dep, pybind11_dep],
dependencies: py_deps,
link_language: 'cpp',
install: true,
subdir: package,
Expand All @@ -10,7 +10,7 @@ example_1 = py.extension_module(
_linalg = py.extension_module(
'_linalg',
sources: ['_linalg.cpp'],
dependencies: [py_dep, pybind11_dep] + blaze_deps,
dependencies: py_deps + blaze_deps,
link_language: 'cpp',
install: true,
subdir: package,
Expand All @@ -19,7 +19,7 @@ _linalg = py.extension_module(
_linalg_numpy = py.extension_module(
'_linalg_numpy',
sources: ['_linalg_numpy.cpp'],
dependencies: [py_dep, pybind11_dep] + blaze_deps,
dependencies: py_deps + blaze_deps,
link_language: 'cpp',
install: true,
subdir: package,
Expand All @@ -33,7 +33,7 @@ _PyArrays = py.extension_module(
'Utilities/Math/Python/BlazeMatrix.cpp',
'Utilities/Math/Python/BlazeTensor.cpp',
],
dependencies: [py_dep, pybind11_dep] + blaze_deps,
dependencies: py_deps + blaze_deps,
link_language: 'cpp',
install: true,
subdir: package,
Expand All @@ -45,7 +45,7 @@ _PyTags = py.extension_module(
'Systems/Python/Bindings.cpp',
'Systems/Python/BindTags.cpp',
],
dependencies: [py_dep, pybind11_dep] + blaze_deps,
dependencies: py_deps + blaze_deps + brigand_dep,
link_language: 'cpp',
install: true,
subdir: package,
Expand Down

0 comments on commit 80dae52

Please sign in to comment.