@@ -77,10 +77,10 @@ def test_collect(package_complex):
77
77
78
78
def test_mesonpy_meta_finder (package_complex , tmp_path ):
79
79
# build a package in a temporary directory
80
- mesonpy .Project (package_complex , tmp_path )
80
+ project = mesonpy .Project (package_complex , tmp_path )
81
81
82
82
# point the meta finder to the build directory
83
- finder = _editable .MesonpyMetaFinder ('complex' , {'complex' }, os .fspath (tmp_path ), [ 'ninja' ] )
83
+ finder = _editable .MesonpyMetaFinder ('complex' , {'complex' }, os .fspath (tmp_path ), project . _build_command , True )
84
84
85
85
# check repr
86
86
assert repr (finder ) == f'MesonpyMetaFinder(\' complex\' , { str (tmp_path )!r} )'
@@ -141,10 +141,10 @@ def test_mesonpy_traversable():
141
141
def test_resources (tmp_path ):
142
142
# build a package in a temporary directory
143
143
package_path = pathlib .Path (__file__ ).parent / 'packages' / 'simple'
144
- mesonpy .Project (package_path , tmp_path )
144
+ project = mesonpy .Project (package_path , tmp_path )
145
145
146
146
# point the meta finder to the build directory
147
- finder = _editable .MesonpyMetaFinder ('simple' , {'simple' }, os .fspath (tmp_path ), [ 'ninja' ] )
147
+ finder = _editable .MesonpyMetaFinder ('simple' , {'simple' }, os .fspath (tmp_path ), project . _build_command , True )
148
148
149
149
# verify that we can look up resources
150
150
spec = finder .find_spec ('simple' )
@@ -160,10 +160,10 @@ def test_resources(tmp_path):
160
160
def test_importlib_resources (tmp_path ):
161
161
# build a package in a temporary directory
162
162
package_path = pathlib .Path (__file__ ).parent / 'packages' / 'simple'
163
- mesonpy .Project (package_path , tmp_path )
163
+ project = mesonpy .Project (package_path , tmp_path )
164
164
165
165
# point the meta finder to the build directory
166
- finder = _editable .MesonpyMetaFinder ('simple' , {'simple' }, os .fspath (tmp_path ), [ 'ninja' ] )
166
+ finder = _editable .MesonpyMetaFinder ('simple' , {'simple' }, os .fspath (tmp_path ), project . _build_command , True )
167
167
168
168
try :
169
169
# install the finder in the meta path
@@ -210,9 +210,9 @@ def test_editble_reentrant(venv, editable_imports_itself_during_build):
210
210
211
211
def test_editable_pkgutils_walk_packages (package_complex , tmp_path ):
212
212
# build a package in a temporary directory
213
- mesonpy .Project (package_complex , tmp_path )
213
+ project = mesonpy .Project (package_complex , tmp_path )
214
214
215
- finder = _editable .MesonpyMetaFinder ('complex' , {'complex' }, os .fspath (tmp_path ), [ 'ninja' ] )
215
+ finder = _editable .MesonpyMetaFinder ('complex' , {'complex' }, os .fspath (tmp_path ), project . _build_command , True )
216
216
217
217
try :
218
218
# install editable hooks
@@ -244,8 +244,8 @@ def test_editable_pkgutils_walk_packages(package_complex, tmp_path):
244
244
245
245
246
246
def test_custom_target_install_dir (package_custom_target_dir , tmp_path ):
247
- mesonpy .Project (package_custom_target_dir , tmp_path )
248
- finder = _editable .MesonpyMetaFinder ('package' , {'package' }, os .fspath (tmp_path ), [ 'ninja' ] )
247
+ project = mesonpy .Project (package_custom_target_dir , tmp_path )
248
+ finder = _editable .MesonpyMetaFinder ('package' , {'package' }, os .fspath (tmp_path ), project . _build_command , True )
249
249
try :
250
250
sys .meta_path .insert (0 , finder )
251
251
import package .generated .one
0 commit comments