11# replace the version by running:
22# meson rewrite kwargs set project / version $(python scripts/extract_version.py)
33project (
4- ' pymmcore-nano' ,
5- ' cpp' ,
6- version : ' 11.9 .0.73.2 ' ,
7- meson_version : ' >= 1.2 .0' ,
8- default_options : [' cpp_std=c++17' ]
4+ ' pymmcore-nano' ,
5+ ' cpp' ,
6+ version : ' 11.10 .0.74.0 ' ,
7+ meson_version : ' >=1.4 .0' ,
8+ default_options : [' cpp_std=c++17' ],
99)
1010
1111if host_machine .system() == ' darwin'
12- add_project_arguments (' -U_LIBCPP_ENABLE_ASSERTIONS' , language : ' cpp' )
12+ add_project_arguments (' -U_LIBCPP_ENABLE_ASSERTIONS' , language : ' cpp' )
1313endif
1414
1515py = import (' python' ).find_installation(pure : false )
1616nanobind_dep = dependency (' nanobind' , static : true )
1717
18-
1918# Run a command to get the Python include path
2019python_include_path = run_command (
21- py.full_path(), [' -c' , ' import sysconfig; print(sysconfig.get_paths()["include"])' ]
20+ py.full_path(),
21+ [' -c' , ' import sysconfig; print(sysconfig.get_paths()["include"])' ],
2222).stdout().strip()
2323
24- # Include the subprojects.
25- subdir (' src/mmCoreAndDevices/MMDevice' )
26- subdir (' src/mmCoreAndDevices/MMCore' )
27- if get_option (' build_device_adapters' )
28- subdir (' src/mmCoreAndDevices/DeviceAdapters' )
29- endif
30-
31- mmdevice_dep = dependency (' mmdevice_dep' )
32- mmcore_dep = dependency (' mmcore_dep' )
33-
24+ mmcore_proj = subproject (
25+ ' mmcore' ,
26+ default_options : {' default_library' : ' static' , ' tests' : ' disabled' },
27+ )
28+ mmcore_dep = mmcore_proj.get_variable (' mmcore' )
3429
3530# --------------------------
3631
@@ -47,11 +42,10 @@ if get_option('match_swig')
4742 cpp_args += [' -DMATCH_SWIG' ]
4843endif
4944
50-
5145ext_module = py.extension_module(
5246 ' _pymmcore_nano' ,
53- sources : [' src/_pymmcore_nano.cc' ] + mmcore_sources ,
54- dependencies : [nanobind_dep, mmcore_dep, mmdevice_dep ],
47+ sources : [' src/_pymmcore_nano.cc' ],
48+ dependencies : [nanobind_dep, mmcore_dep],
5549 install : true ,
5650 subdir : ' pymmcore_nano' ,
5751 cpp_args : cpp_args + [' -DNB_DOMAIN=pmn' ],
@@ -67,7 +61,8 @@ custom_target(
6761 py.full_path(),
6862 meson .project_source_root() + ' /scripts/build_stubs.py' ,
6963 ext_module.full_path(),
70- meson .project_source_root() + ' /src/pymmcore_nano/_pymmcore_nano.pyi' ,
64+ meson .project_source_root()
65+ + ' /src/pymmcore_nano/_pymmcore_nano.pyi' ,
7166 ],
7267 depends : ext_module,
7368)
9186 args : [' -m' , ' pytest' , ' --color=yes' , ' -v' ],
9287 workdir : meson .current_source_dir(),
9388)
94-
95- meson .add_dist_script(py.full_path(), meson .current_source_dir() / ' scripts/generate_dist.py' )
0 commit comments