Skip to content

Commit 47be6cd

Browse files
committed
Fix Windows code
1 parent 79aa519 commit 47be6cd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mesonbuild/dependencies/python.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,15 +343,15 @@ def get_windows_python_arch(self) -> str:
343343
return 'aarch64'
344344
raise DependencyException('Unknown Windows Python platform {self.platform!r}')
345345

346-
def get_windows_link_args(self, limited_api: bool) -> T.Optional[T.List[str]]:
346+
def get_windows_link_args(self, limited_api: bool, environment: 'Environment') -> T.Optional[T.List[str]]:
347347
if self.build_config:
348348
if self.static:
349349
key = 'static'
350350
elif limited_api:
351351
key = 'dynamic-stableabi'
352352
else:
353353
key = 'dynamic'
354-
sysroot = environment.properties[for_machine].get_sys_root() or ''
354+
sysroot = environment.properties[self.for_machine].get_sys_root() or ''
355355
return [sysroot + self.build_config['libpython'][key]]
356356

357357
if self.platform.startswith('win'):
@@ -442,7 +442,7 @@ def find_libpy_windows(self, env: 'Environment', limited_api: bool = False) -> N
442442
self.is_found = False
443443
return
444444
# This can fail if the library is not found
445-
largs = self.get_windows_link_args(limited_api)
445+
largs = self.get_windows_link_args(limited_api, env)
446446
if largs is None:
447447
self.is_found = False
448448
return

0 commit comments

Comments
 (0)