Skip to content

Commit 8f66092

Browse files
committed
Add an option to disable Flint version check
1 parent 07ed9cd commit 8f66092

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

meson.build

+20-1
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,32 @@
11
project('python-flint', 'cython', 'c')
22

3+
#
4+
# For the source release, we should by default fail for newer versions of Flint
5+
# that are untested with a nice error message:
6+
#
7+
# ../meson.build:10:12:
8+
# ERROR: Dependency lookup for flint with method 'pkgconfig' failed:
9+
# Invalid version, need 'flint' ['<3.2'] found '3.2.0'.
10+
#
11+
# We need an option to disable this though so that we can test newer versions
12+
# of Flint. Also good to have an escape hatch for users since we don't know
13+
# that future versions of Flint will not work.
14+
#
15+
if get_option('flint_version_check')
16+
flint_version_required = ['>=3.0', '<3.2']
17+
else
18+
# We do know that Flint < 3.0 will not work so no point allowing it.
19+
flint_version_required = ['>=3.0']
20+
endif
21+
322
py = import('python').find_installation(pure: false)
423
dep_py = py.dependency()
524

625
cc = meson.get_compiler('c')
726

827
gmp_dep = dependency('gmp')
928
mpfr_dep = dependency('mpfr')
10-
flint_dep = dependency('flint', version: ['>=3.0', '<3.2'])
29+
flint_dep = dependency('flint', version: flint_version_required)
1130

1231
add_project_arguments(
1332
'-X', 'embedsignature=True',

meson.options

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
option('coverage', type : 'boolean', value : false, description : 'enable coverage build')
22
option('add_flint_rpath', type : 'boolean', value : false)
3+
option('flint_version_check', type: 'boolean', value : true)

0 commit comments

Comments
 (0)