Skip to content

Commit

Permalink
src/sage/libs/giac/meson.build: build extension only if libgiac is found
Browse files Browse the repository at this point in the history
The giac package is already marked optional, but it isn't really
optional because the cython extension can't be built without libgiac.
Now, the extension will be skipped if giac is absent. Recent changes
in sagelib have made this feasible.
  • Loading branch information
orlitzky committed Oct 14, 2024
1 parent e6d4f1a commit 3c61736
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions src/sage/libs/giac/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ py.install_sources('__init__.py', 'giac.pxd', 'misc.h', subdir: 'sage/libs/giac'

extension_data_cpp = {'giac': files('giac.pyx')}

foreach name, pyx : extension_data_cpp
py.extension_module(
name,
sources: pyx,
subdir: 'sage/libs/giac',
install: true,
override_options: ['cython_language=cpp'],
include_directories: [inc_cpython, inc_ext, inc_rings],
dependencies: [py_dep, cysignals, giac, gmp],
)
endforeach

if giac.found()
foreach name, pyx : extension_data_cpp
py.extension_module(
name,
sources: pyx,
subdir: 'sage/libs/giac',
install: true,
override_options: ['cython_language=cpp'],
include_directories: [inc_cpython, inc_ext, inc_rings],
dependencies: [py_dep, cysignals, giac, gmp],
)
endforeach
endif

0 comments on commit 3c61736

Please sign in to comment.