Package SCons :: Package Platform :: Module win32
[hide private]
[frames] | no frames]

Module win32

source code

SCons.Platform.win32

Platform-specific initialization for Win32 systems.

There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Platform.Platform() selection method.

Classes [hide private]
  _scons_file
  ArchDefinition
Determine which windows CPU were running on. A class for defining architecture-specific settings and logic.
Functions [hide private]
 
_scons_fixup_mode(mode)
Adjust 'mode' to mark handle as non-inheritable.
source code
 
_scons_open(name, mode=None, *args, **kwargs) source code
 
win_api_copyfile(src, dst) source code
 
spawnve(mode, file, args, env) source code
 
piped_spawn(sh, escape, cmd, args, env, stdout, stderr) source code
 
exec_spawn(l, env) source code
 
spawn(sh, escape, cmd, args, env) source code
 
escape(x) source code
 
get_system_root() source code
 
get_program_files_dir()
Get the location of the program files directory Returns -------
source code
 
get_architecture(arch=None)
Returns the definition for the specified architecture string.
source code
 
generate(env) source code
Variables [hide private]
  __revision__ = 'src/engine/SCons/Platform/win32.py bee7caf9def...
  CHOCO_DEFAULT_PATH = ['C:\\ProgramData\\chocolatey\\bin']
  _builtin_file = __builtin__.file
  _builtin_open = __builtin__.open
  CopyFile = windll.kernel32.CopyFileA
  SetFileTime = windll.kernel32.SetFileTime
  _shutil_copy = shutil.copy
  _shutil_copy2 = shutil.copy2
  parallel_msg = 'you do not seem to have the pywin32 extensions...
  spawn_lock = <thread.lock object>
  _system_root = None
hash(x)
  SupportedArchitectureList = [<SCons.Platform.win32.ArchDefinit...
  SupportedArchitectureMap = {'AMD64': <SCons.Platform.win32.Arc...
  __package__ = 'SCons.Platform'
  a = <SCons.Platform.win32.ArchDefinition object>
  s = 'IA64'
Function Details [hide private]

_scons_fixup_mode(mode)

source code 

Adjust 'mode' to mark handle as non-inheritable.

SCons is multithreaded, so allowing handles to be inherited by children opens us up to races, where (e.g.) processes spawned by the Taskmaster may inherit and retain references to files opened by other threads. This may lead to sharing violations and, ultimately, build failures.

By including 'N' as part of fopen's 'mode' parameter, all file handles returned from these functions are atomically marked as non-inheritable.

get_architecture(arch=None)

source code 

Returns the definition for the specified architecture string.

If no string is specified, the system default is returned (as defined by the PROCESSOR_ARCHITEW6432 or PROCESSOR_ARCHITECTURE environment variables).


Variables Details [hide private]

__revision__

Value:
'src/engine/SCons/Platform/win32.py bee7caf9defd6e108fc2998a2520ddb36a\
967691 2019-12-17 02:07:09 bdeegan'

parallel_msg

Value:
'''you do not seem to have the pywin32 extensions installed;
\tparallel (-j) builds may not work reliably with open Python files.''\
'

SupportedArchitectureList

Value:
[<SCons.Platform.win32.ArchDefinition object>,
 <SCons.Platform.win32.ArchDefinition object>,
 <SCons.Platform.win32.ArchDefinition object>]

SupportedArchitectureMap

Value:
{'AMD64': <SCons.Platform.win32.ArchDefinition object>,
 'EM64T': <SCons.Platform.win32.ArchDefinition object>,
 'IA64': <SCons.Platform.win32.ArchDefinition object>,
 'amd64': <SCons.Platform.win32.ArchDefinition object>,
 'em64t': <SCons.Platform.win32.ArchDefinition object>,
 'i386': <SCons.Platform.win32.ArchDefinition object>,
 'i486': <SCons.Platform.win32.ArchDefinition object>,
 'i586': <SCons.Platform.win32.ArchDefinition object>,
...