@@ -68,21 +68,21 @@ if pyprojectwheelbuild_enabled
6868 ' src/example_fgen_basic/runtime_helpers.py' ,
6969 )
7070
71- # if host_machine.system() == 'windows'
72- # meson.override_find_program('ar', find_program('llvm-lib', required: true))
71+ if host_machine .system() == ' windows'
72+ meson .override_find_program(' ar' , find_program (' llvm-lib' , required : true ))
7373 # also tell Meson to use MSVC-compatible static library
74- # ancillary_lib = library(
75- # '@0@-ancillary'.format(meson.project_name()),
76- # sources: srcs_ancillary_lib,
77- # version: meson.project_version(),
78- # dependencies: [],
79- # install: false,
80- # override_options: ['b_vscrt=md', 'default_library=static', 'vs_library_format=lib']
81- # )
82- # else
74+ ancillary_lib = library (
75+ ' @0@-ancillary' .format(meson .project_name()),
76+ sources : srcs_ancillary_lib,
77+ version : meson .project_version(),
78+ dependencies : [],
79+ install : false ,
80+ override_options : [' b_vscrt=md' , ' default_library=static' , ' vs_library_format=lib' ]
81+ )
82+ else
8383 # The ancillary library,
8484 # i.e. all the stuff for wrapping that isn't directly exposed to Python.
85- ancillary_lib = library (
85+ ancillary_lib = library (
8686 ' @0@-ancillary' .format(meson .project_name()),
8787 sources : srcs_ancillary_lib,
8888 version : meson .project_version(),
@@ -91,7 +91,7 @@ if pyprojectwheelbuild_enabled
9191 # e.g. dependencies: [fgen_core_dep],
9292 install : false ,
9393 )
94- # endif
94+ endif
9595
9696 ancillary_dep = declare_dependency (link_with : ancillary_lib)
9797
@@ -129,26 +129,16 @@ if pyprojectwheelbuild_enabled
129129 ]
130130 )
131131 # Build the extension module
132- # py.extension_module(
133- # extension_module_name,
134- # [srcs, python_fortran_interface],
135- # incdir_f2py / 'fortranobject.c',
136- # include_directories: [inc_np, incdir_f2py],
137- # dependencies : [ancillary_dep],
138- # # # If you need other deps, add them here too e.g.
139- # # dependencies : [ancillary_dep, fgen_core_dep],
140- # install: true,
141- # subdir: python_project_name,
142- # )
143- f2py_fortranobject_c = files (incdir_f2py / ' fortranobject.c' )
144-
145132 py.extension_module(
146- extension_module_name,
147- [srcs + srcs_ancillary_lib, python_fortran_interface, f2py_fortranobject_c],
148- include_directories : [inc_np, incdir_f2py],
149- dependencies : [], # still no ancillary_dep needed
150- install : true ,
151- subdir : python_project_name,
133+ extension_module_name,
134+ [srcs, python_fortran_interface],
135+ incdir_f2py / ' fortranobject.c' ,
136+ include_directories : [inc_np, incdir_f2py],
137+ dependencies : [ancillary_dep],
138+ # # If you need other deps, add them here too e.g.
139+ # dependencies : [ancillary_dep, fgen_core_dep],
140+ install : true ,
141+ subdir : python_project_name,
152142 )
153143
154144 # If some files (such as .py files) need to be copied to site-packages,
0 commit comments