File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,14 +24,24 @@ nanobind_dep = dependency('nanobind', static: true)
2424odrpack_dep = dependency (' odrpack95' , static : true )
2525
2626# build extension module
27- nanobind_ext = python.extension_module(
28- ' __odrpack' ,
29- ' src/odrpack/__odrpack.py.cpp' ,
30- dependencies : [python_dep, nanobind_dep, odrpack_dep],
31- install : true ,
32- limited_api : ' 3.12' ,
33- subdir : ' odrpack'
34- )
27+ if python.language_version().version_compare(' >=3.12' )
28+ nanobind_ext = python.extension_module(
29+ ' __odrpack' ,
30+ ' src/odrpack/__odrpack.py.cpp' ,
31+ dependencies : [python_dep, nanobind_dep, odrpack_dep],
32+ install : true ,
33+ limited_api : ' 3.12' ,
34+ subdir : ' odrpack'
35+ )
36+ else
37+ nanobind_ext = python.extension_module(
38+ ' __odrpack' ,
39+ ' src/odrpack/__odrpack.py.cpp' ,
40+ dependencies : [python_dep, nanobind_dep, odrpack_dep],
41+ install : true ,
42+ subdir : ' odrpack'
43+ )
44+ endif
3545
3646python.install_sources(
3747 [
You can’t perform that action at this time.
0 commit comments