(self, env: 'Environment')
Find python3 libraries on Windows and also verify that the arch matches
        what we are building for.
Find python3 libraries on Windows and also verify that the arch matches
        what we are building for.
Find python3 libraries on Windows and also verify that the arch matches what we are building for .
def _find_libpy3_windows(self, env: 'Environment') -> None:
        '''
        Find python3 libraries on Windows and also verify that the arch matches
        what we are building for.
        '''
        pyarch = self.get_windows_python_arch()
        if pyarch is None:
            self.is_found = False
            return
        arch = detect_cpu_family(env.coredata.compilers.host)
        if arch == 'x86':
            arch = '32'
        elif arch == 'x86_64':
            arch = '64'
        else:
            # We can't cross-compile Python 3 dependencies on Windows yet
            mlog.log(f'Unknown architecture {arch!r} for',
                     mlog.bold(self.name))
            self.is_found = False
            return
        # Pyarch ends in '32' or '64'
        if arch != pyarch:
            mlog.log('Need', mlog.bold(self.name), 'for {}-bit, but '
                     'found {}-bit'.format(arch, pyarch))
            self.is_found = False
            return
        # This can fail if the library is not found
        largs = self.get_windows_link_args()
        if largs is None:
            self.is_found = False
            return
        self.link_args = largs
        # Compile args
        inc = sysconfig.get_path('include')
        platinc = sysconfig.get_path('platinclude')
        self.compile_args = ['-I' + inc]
        if inc != platinc:
            self.compile_args.append('-I' + platinc)
        self.version = sysconfig.get_config_var('py_version')
        self.is_found = True
def _find_libpy3_windows ( self , env : 'Environment' ) -> None : pyarch = self . get_windows_python_arch ( ) if pyarch is None : self . is_found = False return arch = detect_cpu_family ( env . coredata . compilers . host ) if arch == 'x86' : arch = '32' elif arch == 'x86_64' : arch = '64' else : # We can't cross-compile Python 3 dependencies on Windows yet mlog . log ( f'Unknown architecture {arch!r} for' , mlog . bold ( self . name ) ) self . is_found = False return # Pyarch ends in '32' or '64' if arch != pyarch : mlog . log ( 'Need' , mlog . bold ( self . name ) , 'for {}-bit, but ' 'found {}-bit' . format ( arch , pyarch ) ) self . is_found = False return # This can fail if the library is not found largs = self . get_windows_link_args ( ) if largs is None : self . is_found = False return self . link_args = largs # Compile args inc = sysconfig . get_path ( 'include' ) platinc = sysconfig . get_path ( 'platinclude' ) self . compile_args = [ '-I' + inc ] if inc != platinc : self . compile_args . append ( '-I' + platinc ) self . version = sysconfig . get_config_var ( 'py_version' ) self . is_found = True