�
¶Zc�����������@���s����d��d�l��Z��d��d�l�Z�d��d�l�Z�d��d�l�Z�d��d�l�Z�d��d�l�Z�d��d�l�m�Z�d��d�l�m	�Z	�d��d�l
�m�Z�d��d�l�m
�Z
�d�d�l�m�Z�d�e�f�d	�������YZ�d�S(
���i����N(���t���MSVCCompiler(���t
���UnixCCompiler(���t���Mingw32CCompiler(���t���customize_compileri���(���t���utilst	���CCompilerc�����������B���sq���e��Z�d��Z�d	�Z�d��Z�e�j�e�j�d	�d���Z	�d����Z
�d����Z�d����Z�d����Z
�d����Z�d����Z�d����Z�RS(
���t����c���������C���s:��|�d�k�r��|�d��k�r]�|�j�d���d�k�sB�|�j�d���d�k�rK�d�}�q]�t�j�j����}�n��|�d�k�r��|�d�k�r��t�d�|�����q��n�t�j�j����}�|�d�k�r��d�d	�l�m�}�|�j����|��_	�n�t�j�j
�d
�|���|��_	�t�|��j	���t�|��j	�t
���rT|��j	�j�d�g�k�r#g��|��j	�_�n��|��j	�j�d��k�rT|��j	�j	�d�g�|��j	�_�qTn��|��j����r�d
�t�j�d�<d�t�j�k�r�d�t�j�k�r�t�j�j�d���t�j�d�<q�t�j�j�d���r�t�j�j�d���t�j�d�<q�n��d�|��_�d�|��_�nI�t�|��j	�t
���r|��j	�j	�d�|��_�n�d�j�|��j	�j	���|��_�d�|��_�d��S(���Nt���ntt���MSYSTEMt���MINGW32t���MINGW64t���mingw32t���msvcs'���Specified Compiler '%s' is unsupported.i���(���t���msvccompilert���compilert���msvcrts���-Et���1t���DISTUTILS_USE_SDKt���MSSdkt
���WindowsSDKDirt���VCInstallDirs���cl.exes���-wd4996i����t��� s���-Wno-deprecated-declarations(���t���Nonet���gett	���distutilst	���ccompilert���get_default_compilert
���SystemExitR���R
���t���get_msvc_compilerR���t���new_compilerR���t
���isinstanceR���t
���dll_librariest���preprocessort
���check_is_msvct���ost���environt���compiler_cmdt���_cflags_no_deprecation_warningst���join(���t���selfR#���t���osnamet
���compiler_nameR
���(����(����ss���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/ccompiler.pyt���__init__+���s@����*	

	c���������C���s���g��}�g��}�|��j�����r'�d�d�g�}�nK�d�g�}�|�j�d���|�sr�|�j�d���t�j�d�k�rr�|�j�d���qr�n��xq�|�|�D]e�}�|��j�����r��|�d�k�r��|�j�|�d	���q��q}�|�j�d
���r��|�j�|���q}�|�j�d�|���q}�Wx��|�D]��}	�|��j�����r%|	�j�d�d
���}	�|�j�d�|	���nZ�|�j�d�|	���t�j�j�|	���r|�rk|�j�d���|�j�|	���q|�j�d�|	���n��|�j�|	���q��Wx`�|�D]X�}
�|
�t�j	�k�r�t�j
�j�|�t�j	�|
�g���t�j	�|
�<q�t�j
�j�|���t�j	�|
�<q�Wd��S(���Nt���LIBt���PATHt���LD_LIBRARY_PATHs���-L.s���-Wl,-rpath,.t���darwins���-Wl,--no-as-neededt���ms���.libs���.las���-lt���/s���\s	���-libpath:s���-Ls���-rpaths���-Wl,-rpath,(���R!���t���appendt���syst���platformt���endswitht���replaceR"���t���patht���isabsR#���t���pathsepR&���(���R'���t���argst���libtoolt	���librariest���extra_librariest���libpathst���runtime_path_envvart
���runtime_pathst���libraryt���library_patht���envvar(����(����ss���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/ccompiler.pyt���get_internal_link_flagsp���s@����	




*c���������C���st���xm�|�D]e�}�|��j�����r<�|�d�k�rl�|�j�|�d���ql�q�|�j�d���r[�|�j�|���q�|�j�d�|���q�Wd��S(���NR/���s���.libs���.las���-l(���R!���R1���R4���(���R'���R9���R;���R@���(����(����ss���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/ccompiler.pyt���get_external_link_flags����s����
c���	������C���s����d�g�}�|��j��|���\�}�}�}�d�g�}�|�j�|���|�j�|���|��j����r��|�j�d���|�j�d
���|�j�d���|�j�d���n��|��j�j�d�|�d�|�d	�|�d
�|�d�|���d��S(���Ns���-Ct���.t���_USE_DECLSPECS_FOR_SALt���_CRT_SECURE_NO_WARNINGSt���_CRT_NONSTDC_NO_WARNINGSt���SAL_NO_ATTRIBUTE_DECLARATIONSt���sourcet���output_filet���macrost���include_dirst���extra_postargs(���RF���N(���RG���N(���RH���N(���RI���N(���t���_set_cpp_optionst���extendR!���R1���R���R���t
���preprocess(	���R'���RJ���t���outputt���cpp_optionsRN���t
���include_pathsRL���t���postargsRM���(����(����ss���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/ccompiler.pyRQ�������s����		




c���������C���s���g��}�g��}�d�j��|���}�|�j�t�j�d�|�j�t�j�����}�|��j�|���\�}	�}
�}�x�|�D]�}�|�j�|���q^�Wt�|��j�t���rBt�j	�j
�d���}
�|
�rBx��t�t�j
�|
�����D]��\�}�}�|�j�d���r��|�j�d���}�|�d�k�r	|�d�|�!|�|�d�f�}�n�|�d�d��f�}�|�|
�k�r8|
�j�|���q8q��q��WqBn��|��j�d	�k�rh|�rh|�j�d
���n��|�j�|��j���|�j�|	���|�j�|���|��j�j�d�|�d�|
�d
�|�d�|�d�t�j�j�t�j�����S(���NR���i����t���CFLAGSs���-Dt���=i����i���i���t���gccs���-Wallt���sourcesRL���RM���RN���t
���output_dir(���R&���t���rfindR"���t���sepRO���R1���R���R���R���R#���R���t	���enumeratet���shlext���splitt
���startswitht���findR���R$���R%���RP���t���compileR6���t���abspath(���R'���t���pkg_config_cflagst���cpp_includesRJ���t
���init_sectionsRN���t���includest
���source_strt
���tmpdir_idxRT���RL���t
���extra_argst���includet���cflagst���it���cflagt���stridxt���macroset(����(����ss���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/ccompiler.pyRb�������s:����$
"


c���������C���s��g��}�g��}�|��j�����r��t�j�j�d���}�|�j�d���}�|�j�d���|�j�d���t�j�j�d�k��r�g��|�D]�}�|�d�k�rl�|�^�ql�|�(q�nt	�j
�|���}�|�r��t�j�d�k�r��|�j�t	�j�t�j�j�d�d	�������n��|�j
�|���|�j�d
���n��|�j
�t�j�j�d�d���d
�g���t�j�|��j�d�g�d�t�j��}�|�j����\�}	�}
�xK�|	�j�d���j����D]4�}�|�j�d���re|�t�d���j�t�j���}�qeqeWg��}�g��}
�x>|�D]6}�t�}�d�|�d�|�d�|�d�|�d�|�g�}�x�|�D]�}�|�r�Pn��|�j�d���r|�d�}�n��x�|�D]�}�|�r/Pn��t�j�j�|�|���}�t�j�j�|���r|��j�����r`t�j�d�d���\�}�}�t�j�|���d�|�g�}�t�j�|�|�g�|�d�t�j��}�t �|�d����~�}�xt�|�j!����j����D]`�}�d�|�k�r�|�j����}�x?�|�D]4�}�|�j�d���r|�j�|�d�d���t"�}�PqqWq�q�WWd��QX|�j����t�j#�|���q�t�j�|�|�g�d�t�j��}�|�j����\�}	�}
�x4�|	�j�d���j����D]�}�|�j�|���t"�}�Pq�WqqWq�W|�s�|
�j�|���q�q�Wt�|
���d �k�rt$�d!�d"�j�|
�������n��|�S(#���NR+���t���;s���dumpbin.exes���-symbolsi���R/���R���t���SHELLs���sh.exes���--mode=executet���DLLTOOLs���dlltool.exes
���--identifys���-print-search-dirst���stdoutt���asciis���libraries: s���lib%s.dll.as���lib%s.as���%s.dll.as���%s.as���%s.libRW���i���t���prefixs���g-ir-win32-resolve-lib-s���-out:t���rt���__IMPORT_DESCRIPTOR_i���s���.dlli����s4���ERROR: can't resolve libraries to shared libraries: s���, (%���R!���R"���R#���R���R_���R1���R2���t���version_infot���majorR���t���get_libtool_commandt���namet���whichRP���t
���subprocesst���PopenR$���t���PIPEt���communicatet���decodet
���splitlinesR`���t���lenR8���t���FalseR6���R&���t���existst���tempfilet���mkstempt���closet���callt���opent���readt���Truet���unlinkR���(���R'���R;���t���optionsR9���t	���libsearcht���libpatht���libR:���t���proct���ot���et���linet���shlibst���not_resolvedt���foundt
���candidatest���lt���ct���implibt���tmp_fdt���tmp_filenamet���output_flagt���tmp_fileobjt���line_tokenst���item(����(����ss���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/ccompiler.pyt���resolve_windows_libs����s�����	

,(
"#









c���������C���s���t��|��j�t���r�t�St�Sd��S(���N(���R���R���R����R����R����(���R'���(����(����ss���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/ccompiler.pyR!���e��s����c���������C���s'��g��}�g��}�g��}�x|�D]��}�t��j�|���}�|�j�d���rW�|�j�|�t�d�����q�|�j�d���r��|�t�d���}�|�j�d���}�|�d�k�r��|�}	�d��}
�n�|�|� }	�|�|�d�}
�|�j�|	�|
�f���q�|�j�d���r��|�j�|�t�d���f���q�|�d
�k�r�|�j�|���q�q�W|�|�|�f�S(���Ns���-Is���-DRW���i����i���s���-Us���-g3s���-ggdb3s���-gstabs3s���-gcoff3s���-gxcoff3s���-gvms3(���s���-g3s���-ggdb3s���-gstabs3s���-gcoff3s���-gxcoff3s���-gvms3(���R���t���cflag_real_include_pathR`���R1���R����Ra���R���(���R'���R����Rg���RL���t
���other_optionsR����t���optiont���macrot���macro_indext
���macro_namet���macro_value(����(����ss���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/ccompiler.pyRO���l��s*����
	
N(���t���__name__t
���__module__R$���R���R���R%���R"���R#���R|���R*���RC���RD���RQ���Rb���R����R!���RO���(����(����(����ss���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/ccompiler.pyR���%���s���B	;			)	h	(���R"���R^���R~���R����R2���R���t���distutils.msvccompilerR����t���distutils.unixccompilerR���t���distutils.cygwinccompilerR���t���distutils.sysconfigR���R���R���t���objectR���(����(����(����ss���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/ccompiler.pyt���<module>���s���