OwlCyberSecurity - MANAGER
Edit File: msvccompiler.pyc
� {fc�����������@���s��d��Z��d�Z�d�d�l�Z�d�d�l�Z�d�d�l�Z�d�d�l�m�Z�m�Z�m�Z�m �Z �m �Z �d�d�l�m�Z�m �Z �d�d�l�m�Z�d�Z�y@�d�d�l�Z�d�Z�e�Z�e�j�Z�e�j�Z�e�j�Z�e�j�Z�Wn~�e�k �rDyL�d�d�l�Z�d�d�l�Z�d�Z�e�Z�e�j�Z�e�j�Z�e�j�Z�e�j�Z�Wn�e�k �r@e�j�d ���n�Xn�Xe�rle�j�e�j �e�j!�e�j"�f�Z#�n��d ����Z$�d����Z%�d����Z&�d �f��d�������YZ'�d����Z(�d����Z)�d����Z*�d�e�f�d�������YZ+�e(����d�k�re�j,�d���e+�Z-�d�d�l.�m+�Z+�d�d�l.�m'�Z'�n��d�S(���s����distutils.msvccompiler Contains MSVCCompiler, an implementation of the abstract CCompiler class for the Microsoft Visual Studio. s���$Id$i����N(���t���DistutilsExecErrort���DistutilsPlatformErrort���CompileErrort���LibErrort ���LinkError(���t ���CCompilert���gen_lib_options(���t���logi����i���s����Warning: Can't read registry to find the necessary compiler setting Make sure that Python modules _winreg, win32api or win32con are installed.c���������C���s~���y�t��|��|���}�Wn�t�k �r'�d�SXg��}�d�}�xC�y�t�|�|���}�Wn�t�k �r^�Pn�X|�j�|���|�d�}�q7�W|�S(���s���Return list of registry keys.i����i���N(���t���RegOpenKeyExt���RegErrort���Nonet ���RegEnumKeyt���append(���t���baset���keyt���handlet���Lt���it���k(����(����s.���/usr/lib64/python2.7/distutils/msvccompiler.pyt ���read_keys;���s���� c���������C���s����y�t��|��|���}�Wn�t�k �r'�d�SXi��}�d�}�xa�y�t�|�|���\�}�}�}�Wn�t�k �rg�Pn�X|�j����}�t�|���|�t�|���<|�d�}�q7�W|�S(���sX���Return dict of registry keys and values. All names are converted to lowercase. i����i���N(���R���R ���R ���t���RegEnumValuet���lowert���convert_mbcs(���R ���R���R���t���dR���t���namet���valuet���type(����(����s.���/usr/lib64/python2.7/distutils/msvccompiler.pyt���read_valuesM���s���� c���������C���sI���t��|��d�d����}�|�d��k �rE�y�|�d���}��WqE�t�k �rA�qE�Xn��|��S(���Nt���encodet���mbcs(���t���getattrR ���t���UnicodeError(���t���st���enc(����(����s.���/usr/lib64/python2.7/distutils/msvccompiler.pyR���b���s���� t ���MacroExpanderc�����������B���s,���e��Z�d�����Z�d����Z�d����Z�d����Z�RS(���c���������C���s���i��|��_��|��j�|���d��S(���N(���t���macrost���load_macros(���t���selft���version(����(����s.���/usr/lib64/python2.7/distutils/msvccompiler.pyt���__init__m���s���� c���������C���sC���x<�t��D]4�}�t�|�|���}�|�r�|�|�|��j�d�|�<Pq�q�Wd��S(���Ns���$(%s)(���t���HKEYSR���R#���(���R%���t���macrot���pathR���R ���R���(����(����s.���/usr/lib64/python2.7/distutils/msvccompiler.pyt ���set_macroq���s ���� c��� ������C���s%��d�|�}�|��j��d�|�d�d���|��j��d�|�d�d���d�}�|��j��d�|�d ���y9�|�d �k�rv�|��j��d�|�d���n�|��j��d�|�d ���Wn�t�k �r��t�d���n�Xd�}�xq�t�D]i�}�y�t�|�|���}�Wn�t�k �r��q��n�Xt�|�d���}�t�|�d�|�|�f���}�|�d�|��j�d�<q��Wd��S(���Ns%���Software\Microsoft\VisualStudio\%0.1ft���VCInstallDirs ���\Setup\VCt ���productdirt���VSInstallDirs ���\Setup\VSs ���Software\Microsoft\.NETFrameworkt���FrameworkDirt���installrootg������@t���FrameworkSDKDirs���sdkinstallrootv1.1t���sdkinstallroots��Python was built with Visual Studio 2003; extensions must be built with a compiler than can generate compatible binaries. Visual Studio 2003 was not found on this system. If you have Cygwin installed, you can try compiling with MingW32, by passing "-c mingw32" to setup.py.s.���Software\Microsoft\NET Framework Setup\Producti����s���%s\%sR&���s���$(FrameworkVersion)( ���R+���t���KeyErrorR���R(���R���R ���R���R���R#���( ���R%���R&���t���vsbaset���nett���pR ���t���hR���R���(����(����s.���/usr/lib64/python2.7/distutils/msvccompiler.pyR$���x���s*���� c���������C���s9���x2�|��j��j����D]!�\�}�}�t�j�|�|�|���}�q�W|�S(���N(���R#���t���itemst���stringt���replace(���R%���R ���R���t���v(����(����s.���/usr/lib64/python2.7/distutils/msvccompiler.pyt���sub����s����(���t���__name__t ���__module__R'���R+���R$���R<���(����(����(����s.���/usr/lib64/python2.7/distutils/msvccompiler.pyR"���k���s��� c����������C���s����d�}��t��j�t�j�|����}�|�d�k�r+�d�S|�t�|����}�t�j�|�j�d�d���\�}�}�t�|�d� ��d�}�t�|�d�d�!��d �}�|�d�k�r��d �}�n��|�d�k�r��|�|�Sd�S(���s����Return the version of MSVC that was used to build Python. For Python 2.3 and up, the version number is included in sys.version. For earlier versions, assume the compiler is MSVC 6. s���MSC v.i����i���t��� i���i����i���i���g������$@i����N(���R9���t���findt���sysR&���t���lent���splitt���intR ���(���t���prefixR���R ���t���restt���majorVersiont���minorVersion(����(����s.���/usr/lib64/python2.7/distutils/msvccompiler.pyt���get_build_version����s���� c����������C���s[���d�}��t��j�t�j�|����}�|�d�k�r+�d�St��j�t�j�d�|���}�t�j�|�t�|����|�!S(���sa���Return the processor architecture. Possible results are "Intel", "Itanium", or "AMD64". s��� bit (i����t���Intelt���)(���R9���R@���RA���R&���RB���(���RE���R���t���j(����(����s.���/usr/lib64/python2.7/distutils/msvccompiler.pyt���get_build_architecture����s����c���������C���sI���g��}�x<�|��D]4�}�t��j�j�|���}�|�|�k�r �|�j�|���q �q �W|�S(���sn���Return a list of normalized paths with duplicates removed. The current order of paths is maintained. (���t���osR*���t���normpathR���(���t���pathst ���reduced_pathsR6���t���np(����(����s.���/usr/lib64/python2.7/distutils/msvccompiler.pyt���normalize_and_reduce_paths����s���� t���MSVCCompilerc�����������B���sD��e��Z�d��Z�d�Z�i��Z�d�g�Z�d�d�d�g�Z�d�g�Z�d�g�Z�e�e�e�e�Z �d�Z �d �Z�d �Z�d�Z �d�Z�Z�d �Z�d�d�d�d���Z�d����Z�d�d�d���Z�d�d�d�d�d�d�d�d���Z�d�d�d�d���Z�d�d�d�d�d�d�d�d�d�d�d�� �Z�d����Z�d����Z�d����Z�d�d���Z�d����Z�d�d���Z�d����Z�RS(���sw���Concrete class that implements an interface to Microsoft Visual C++, as defined by the CCompiler abstract class.t���msvcs���.cs���.ccs���.cpps���.cxxs���.rcs���.mcs���.ress���.objs���.libs���.dlls���%s%ss���.exei����c���������C���s����t��j�|��|�|�|���t����|��_�t����|��_�|��j�d�k�r��|��j�d�k�rj�d�|��_�t�|��j���|��_�n �d�|��_�d�|��j�|��_ �n�d�|��j�d�|��_ �t �|��_�d��S(���NRJ���i���s���Software\Microsoft\VisualStudios���Software\Microsoft\Devstudios���Visual Studio version %ss���Microsoft SDK compiler %si���(���R���R'���RI���t���_MSVCCompiler__versionRM���t���_MSVCCompiler__archt���_MSVCCompiler__rootR"���t���_MSVCCompiler__macrost���_MSVCCompiler__productt���Falset���initialized(���R%���t���verboset���dry_runt���force(����(����s.���/usr/lib64/python2.7/distutils/msvccompiler.pyR'�������s���� c���������C���s���g��|��_��d�t�j�k�rf�d�t�j�k�rf�|��j�d���rf�d�|��_�d�|��_�d�|��_�d�|��_�d�|��_�n��|��j �d���|��_��t �|��j����d �k�r��t�d �|��j���n��|��j�d���|��_�|��j�d���|��_�|��j�d���|��_�|��j�d���|��_�|��j�d���|��_�|��j �d���|��j �d���y8�x1�t�j�t�j�d�d ���D]�}�|��j��j�|���q1WWn�t�k �r_n�Xt�|��j����|��_��t�j�|��j��d ���t�j�d�<d��|��_�|��j�d�k�r�d�d�d�d�d�d�g�|��_�d�d�d�d�d�d�d�g�|��_�n9�d�d�d�d�d�d�g�|��_�d�d�d�d�d�d�d�g�|��_�d�d�d�g�|��_�|��j�d�k�rTd�d�d�d�g�|��_�n�d�d�d�d�d�g�|��_�d�g�|��_�t�|��_�d��S( ���Nt���DISTUTILS_USE_SDKt���MSSdks���cl.exes���link.exes���lib.exes���rc.exes���mc.exeR*���i����sx���Python was built with %s, and extensions need to be built with the same version of the compiler, but it isn't installed.t���libt���includet���;RJ���s���/nologos���/Oxs���/MDs���/W3s���/GXs���/DNDEBUGs���/Ods���/MDds���/Z7s���/D_DEBUGs���/GS-s���/DLLs���/INCREMENTAL:NOi���s���/INCREMENTAL:nos���/DEBUGs ���/pdb:None(���t���_MSVCCompiler__pathsRN���t���environt���find_exet���cct���linkerRb���t���rct���mct���get_msvc_pathsRB���R���RZ���t���set_path_env_varR9���RC���R���R3���RS���t���joinR ���t���preprocess_optionsRW���t���compile_optionst���compile_options_debugt���ldflags_sharedRV���t���ldflags_shared_debugt���ldflags_statict���TrueR\���(���R%���R6���(����(����s.���/usr/lib64/python2.7/distutils/msvccompiler.pyt ���initialize����sT���� - t����c���������C���s>��|�d��k�r�d�}�n��g��}�x|�D]}�t�j�j�|���\�}�}�t�j�j�|���d�}�|�t�j�j�|���}�|�|��j�k�r��t�d�|�����n��|�r��t�j�j�|���}�n��|�|��j �k�r��|�j �t�j�j�|�|�|��j�����q"�|�|��j �k�r|�j �t�j�j�|�|�|��j�����q"�|�j �t�j�j�|�|�|��j�����q"�W|�S(���NRw���i���s���Don't know how to compile %s(���R ���RN���R*���t���splitextt ���splitdrivet���isabst���src_extensionsR���t���basenamet���_rc_extensionsR���Rn���t ���res_extensiont���_mc_extensionst ���obj_extension(���R%���t���source_filenamest ���strip_dirt ���output_dirt ���obj_namest���src_nameR ���t���ext(����(����s.���/usr/lib64/python2.7/distutils/msvccompiler.pyt���object_filenames<��s(����� c ���������C���s���|��j��s�|��j����n��|��j�|�|�|�|�|�|���\�}�} �}�} �}�|�pL�g��}�|�j�d���|�ru�|�j�|��j���n�|�j�|��j���xM| �D]E} �y�|�| �\�}�}�Wn�t�k �r��q��n�X|�r��t�j �j �|���}�n��|�|��j�k�r��d�|�}�n�|�|��j�k�rd�|�}�nk|�|��j �k�r}|�}�d�| �}�y)�|��j�|��j�g�| �|�g�|�g���Wq��t�k �rv}�t�|���q��Xq��n��|�|��j�k�ret�j �j�|���}�t�j �j�| ���}�y��|��j�|��j�g�d�|�d�|�g�|�g���t�j �j�t�j �j�|�����\�}�}�t�j �j�|�|�d���}�|��j�|��j�g�d�| �g�|�g���Wq��t�k �r^}�t�|���q��Xq��n�t�d�|�| �f�����d �| �}�y-�|��j�|��j�g�|�| �|�|�g�|���Wq��t�k �r�}�t�|���q��Xq��W| �S( ���Ns���/cs���/Tcs���/Tps���/fos���-hs���-rs���.rcs"���Don't know how to compile %s to %ss���/Fo(���R\���Rv���t���_setup_compileR���t���extendRq���Rp���R3���RN���R*���t���abspatht ���_c_extensionst���_cpp_extensionsR}���t���spawnRj���R����R���R���t���dirnameRk���Rx���R|���Rn���Rh���(���R%���t���sourcesR����R#���t���include_dirst���debugt ���extra_preargst���extra_postargst���dependst���objectst���pp_optst���buildt���compile_optst���objt���srcR����t ���input_optt ���output_optt���msgt���h_dirt���rc_dirR ���t���_t���rc_file(����(����s.���/usr/lib64/python2.7/distutils/msvccompiler.pyt���compile]��sj���� � # $$# c��� ������C���s����|��j��s�|��j����n��|��j�|�|���\�}�}�|��j�|�d�|��}�|��j�|�|���r��|�d�|�g�}�|�ro�n��y�|��j�|��j�g�|���Wq��t�k �r��}�t�|���q��Xn�t �j �d�|���d��S(���NR����s���/OUT:s���skipping %s (up-to-date)(���R\���Rv���t���_fix_object_argst���library_filenamet ���_need_linkR����Rb���R����R���R���R����( ���R%���R����t���output_libnameR����R����t���target_langt���output_filenamet���lib_argsR����(����(����s.���/usr/lib64/python2.7/distutils/msvccompiler.pyt���create_static_lib���s���� � c���������C���sW��|��j��s�|��j����n��|��j�|�|���\�}�}�|��j�|�|�|���\�}�}�}�|�rl�|��j�d�t�|�����n��t�|��|�|�|���}�|�d��k �r��t�j �j �|�|���}�n��|��j�|�|���rC|�t�j �k�r��| �r��|��j�d�}�q|��j�d�}�n�| �r��|��j�}�n �|��j�}�g��}�x%�|�pg��D]�}�|�j�d�|���qW|�|�|�|�d�|�g�}�|�d��k �r�t�j �j�t�j �j�|�����\�}�}�t�j �j �t�j �j�|�d���|��j�|�����}�|�j�d�|���n��| �r�| �|�d�*n��|�r�|�j�|���n��|��j�t�j �j�|�����y�|��j�|��j�g�|���WqSt�k �r?}�t�|���qSXn�t�j�d�|���d��S(���Ns5���I don't know what to do with 'runtime_library_dirs': i���s���/EXPORT:s���/OUT:i����s���/IMPLIB:s���skipping %s (up-to-date)(���R\���Rv���R����t ���_fix_lib_argst���warnt���strR���R ���RN���R*���Rn���R����R���t ���EXECUTABLERs���Rr���R���Rx���R|���R����R����R����t���mkpathR����Ri���R����R���R���R����(���R%���t���target_descR����R����R����t ���librariest���library_dirst���runtime_library_dirst���export_symbolsR����R����R����t ���build_tempR����t���lib_optst���ldflagst���export_optst���symt���ld_argst���dll_namet���dll_extt���implib_fileR����(����(����s.���/usr/lib64/python2.7/distutils/msvccompiler.pyt���link���sR���� � c���������C���s���d�|�S(���Ns ���/LIBPATH:(����(���R%���t���dir(����(����s.���/usr/lib64/python2.7/distutils/msvccompiler.pyt���library_dir_option$��s����c���������C���s ���t��d���d��S(���Ns<���don't know how to set runtime library search path for MSVC++(���R���(���R%���R����(����(����s.���/usr/lib64/python2.7/distutils/msvccompiler.pyt���runtime_library_dir_option'��s����c���������C���s ���|��j��|���S(���N(���R����(���R%���Rb���(����(����s.���/usr/lib64/python2.7/distutils/msvccompiler.pyt���library_option+��s����c���������C���s����|�r�|�d�|�g�}�n �|�g�}�xW�|�D]K�}�xB�|�D]:�}�t��j�j�|�|��j�|�����}�t��j�j�|���r6�|�Sq6�Wq)�Wd��Sd��S(���Nt���_d(���RN���R*���Rn���R����t���existsR ���(���R%���t���dirsRb���R����t ���try_namesR����R���t���libfile(����(����s.���/usr/lib64/python2.7/distutils/msvccompiler.pyt���find_library_file/��s���� c���������C���s����xH�|��j��D]=�}�t�j�j�t�j�j�|���|���}�t�j�j�|���r �|�Sq �WxX�t�j�t�j�d�d���D]=�}�t�j�j�t�j�j�|���|���}�t�j�j�|���re�|�Sqe�W|�S(���s���Return path to an MSVC executable program. Tries to find the program in several places: first, one of the MSVC program search paths from the registry; next, the directories in the PATH environment variable. If any of those work, return an absolute path that is known to exist. If none of them work, just return the original program name, 'exe'. t���PathRd���( ���Re���RN���R*���Rn���R����t���isfileR9���RC���Rf���(���R%���t���exeR6���t���fn(����(����s.���/usr/lib64/python2.7/distutils/msvccompiler.pyRg���C��s���� ! !t���x86c���������C���s��t��s �g��S|�d�}�|��j�d�k�r<�d�|��j�|��j�f�}�n�d�|��j�|�f�}�xi�t�D]a�}�t�|�|���}�|�rV�|��j�d�k�r��t�j�|��j�j�|�|���d���St�j�|�|�d���SqV�qV�W|��j�d�k�rx>�t�D]3�}�t�|�d�|��j���d �k �r��|��j �d���Pq��q��Wn��g��S( ���s����Get a list of devstudio directories (include, lib or path). Return a list of strings. The list will be empty if unable to access the registry or appropriate registry keys not found. s��� dirsi���s6���%s\%0.1f\VC\VC_OBJECTS_PLATFORM_INFO\Win32\Directoriess?���%s\6.0\Build System\Components\Platforms\Win32 (%s)\DirectoriesRd���i���s���%s\6.0s����It seems you have Visual Studio 6 installed, but the expected registry settings are not present. You must at least run the Visual Studio GUI once so that these entries are created.N(���t ���_can_read_regRV���RX���R(���R���R9���RC���RY���R<���R ���R����(���R%���R*���t���platformR���R ���R���(����(����s.���/usr/lib64/python2.7/distutils/msvccompiler.pyRl���Z��s(���� c���������C���sS���|�d�k�r�|��j��d���}�n�|��j��|���}�|�rO�t�j�|�d���t�j�|�<n��d�S(���s����Set environment variable 'name' to an MSVC path type value. This is equivalent to a SET command prior to execution of spawned commands. Rb���t���libraryRd���N(���Rl���R9���Rn���RN���Rf���(���R%���R���R6���(����(����s.���/usr/lib64/python2.7/distutils/msvccompiler.pyRm�����s ����N(���R=���R>���t���__doc__t ���compiler_typet���executablesR����R����R}���R���R{���R~���R����t���static_lib_extensiont���shared_lib_extensiont���static_lib_formatt���shared_lib_formatt ���exe_extensionR'���Rv���R����R ���R����R����R����R����R����R����R����Rg���Rl���Rm���(����(����(����s.���/usr/lib64/python2.7/distutils/msvccompiler.pyRT�������sP��� BZG %g������ @s3���Importing new compiler from distutils.msvc9compiler(���RT���(���R"���(/���R����t���__revision__RA���RN���R9���t���distutils.errorsR����R���R���R���R���t���distutils.ccompilerR���R���t ���distutilsR���R����t���_winregt���hkey_modt ���OpenKeyExR���t���EnumKeyR���t ���EnumValueR���t���errorR ���t���ImportErrort���win32apit���win32cont���infot ���HKEY_USERSt���HKEY_CURRENT_USERt���HKEY_LOCAL_MACHINEt���HKEY_CLASSES_ROOTR(���R���R���R���R"���RI���RM���RS���RT���R����t���OldMSVCCompilert���distutils.msvc9compiler(����(����(����s.���/usr/lib64/python2.7/distutils/msvccompiler.pyt���<module>���s`���( . ���