mirror of
https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git
synced 2025-08-14 00:25:46 +02:00
833 lines
30 KiB
Python
833 lines
30 KiB
Python
"""distutils.msvc9compiler
|
|
|
|
Contains MSVCCompiler, an implementation of the abstract CCompiler class
|
|
for the Microsoft Visual Studio 2008.
|
|
|
|
The module is compatible with VS 2005 and VS 2008. You can find legacy support
|
|
for older versions of VS in distutils.msvccompiler.
|
|
"""
|
|
|
|
# Written by Perry Stoll
|
|
# hacked by Robin Becker and Thomas Heller to do a better job of
|
|
# finding DevStudio (through the registry)
|
|
# ported to VS2005 and VS 2008 by Christian Heimes
|
|
|
|
import os
|
|
import subprocess
|
|
import sys
|
|
import re
|
|
import warnings
|
|
|
|
from distutils.errors import (
|
|
DistutilsExecError,
|
|
DistutilsPlatformError,
|
|
CompileError,
|
|
LibError,
|
|
LinkError,
|
|
)
|
|
from distutils.ccompiler import CCompiler, gen_lib_options
|
|
from distutils import log
|
|
from distutils.util import get_platform
|
|
|
|
import winreg
|
|
|
|
warnings.warn(
|
|
"msvc9compiler is deprecated and slated to be removed "
|
|
"in the future. Please discontinue use or file an issue "
|
|
"with pypa/distutils describing your use case.",
|
|
DeprecationWarning,
|
|
)
|
|
|
|
RegOpenKeyEx = winreg.OpenKeyEx
|
|
RegEnumKey = winreg.EnumKey
|
|
RegEnumValue = winreg.EnumValue
|
|
RegError = winreg.error
|
|
|
|
HKEYS = (
|
|
winreg.HKEY_USERS,
|
|
winreg.HKEY_CURRENT_USER,
|
|
winreg.HKEY_LOCAL_MACHINE,
|
|
winreg.HKEY_CLASSES_ROOT,
|
|
)
|
|
|
|
NATIVE_WIN64 = sys.platform == 'win32' and sys.maxsize > 2**32
|
|
if NATIVE_WIN64:
|
|
# Visual C++ is a 32-bit application, so we need to look in
|
|
# the corresponding registry branch, if we're running a
|
|
# 64-bit Python on Win64 |