File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -786,15 +786,15 @@ def __init__(
786786 # Handle cross compilation
787787 self ._is_cross = any (s .startswith ('--cross-file' ) for s in self ._meson_args ['setup' ])
788788 self ._build_details = None
789- if self . _is_cross :
790- # Use build-details.json (PEP 739) to determine
791- # platform/interpreter/abi tags, if given.
792- for setup_arg in self . _meson_args [ 'setup' ] :
793- if setup_arg .startswith ( '-Dpython.build_config=' ) :
794- with open ( setup_arg . split ( '-Dpython.build_config=' )[ 1 ]) as f :
795- self . _build_details = json . load ( f )
796- break
797- else :
789+ # Use build-details.json (PEP 739) to determine
790+ # platform/interpreter/abi tags, if given.
791+ for setup_arg in reversed ( self . _meson_args [ 'setup' ]):
792+ if setup_arg . startswith ( '-Dpython.build_config=' ) :
793+ with open ( setup_arg .split ( '=' , 1 )[ 1 ]) as f :
794+ self . _build_details = json . load ( f )
795+ break
796+ else :
797+ if self . _is_cross :
798798 # TODO: warn that interpreter details may be wrong. Get platform from cross file.
799799 pass
800800
You can’t perform that action at this time.
0 commit comments