�
���Uc�����������@���s����d��d�l��Z��d��d�l�Z�d��d�l�Z�d��d�l�Z�d�a�d����Z�d����Z�e��j�d���Z	�e��j�d���Z
�e��j�d���Z�d����Z�d����Z
�e��j�d	���Z�d
����Z�e��j�d���Z�d����Z�d
����Z�d����Z�d����Z�d����Z�d����Z�d����Z�d�S(���i����Nc���������C���sS���t��d�k�rI�t�j�j�d�d���j�d���a��d�t��k�rI�t��j�d���qI�n��|��t��k�S(���s(��Check for whether a specific debugging feature is enabled.
Well-known flags:
 * start: Drop into debugger just after processing arguments
 * exception: Drop into debugger on fatalexception
 * warning: Drop into debugger on warning
 * posttrans: Drop into debugger just before introspectable pass
t���GI_SCANNER_DEBUGt����t���,N(���t���_debugflagst���Nonet���ost���environt���gett���splitt���remove(���t���flag(����(����so���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pyt���have_debug_flag���s
����	c���������C���s)���t��|����r%�d�d��l�}�|�j����n��d��S(���Ni����(���R���t���pdbt	���set_trace(���R
���R���(����(����so���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pyt���break_on_debug_flag.���s����s���([^A-Z])([A-Z])s���([A-Z][A-Z])([A-Z][0-9a-z])s���^([A-Z])([A-Z])c���������C���s@���t��j�d�|����}��t�j�d�|����}��t�j�d�|��d�d��}��|��S(���sJ��Converts a typename to the equivalent underscores name.
    This is used to form the type conversion macros and enum/flag
    name variables.
    In particular, and differently from to_underscores_noprefix(),
    this function treats the first character differently if it is
    uppercase and followed by another uppercase letter.s���\1_\2t���counti���(���t���_upperstr_pat1t���subt���_upperstr_pat2t���_upperstr_pat3(���t���name(����(����so���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pyt���to_underscores9���s����c���������C���s(���t��j�d�|����}��t�j�d�|����}��|��S(���ss���Like to_underscores, but designed for "unprefixed" names.
    to_underscores("DBusFoo") => dbus_foo, not d_bus_foo.s���\1_\2(���R���R���R���(���R���(����(����so���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pyt���to_underscores_noprefixF���s����s���dlname='([A-z0-9\.\-\+]+)'
c���������C���sM���t��|����}�|�j����}�|�j����t�j�|���}�|�rE�|�j����d�Sd��Sd��S(���Ni����(���t���opent���readt���closet���_libtool_patt���searcht���groupsR���(���t���la_filet���ft���datat���m(����(����so���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pyt���_extract_dlname_fieldQ���s����
s���libdir='([^']+)'c���������C���sM���t��|����}�|�j����}�|�j����t�j�|���}�|�rE�|�j����d�Sd��Sd��S(���Ni����(���R���R���R���t���_libtool_libdir_patR���R���R���(���R���R���R���R ���(����(����so���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pyt���_extract_libdir_field_���s����
c���������C���sx���t��|����}�|�d��k�r�d��St�j����d�k�rh�t�j�j�|���}�t�|����}�|�d��k�r\�|�S|�d�|�St�j�j�|���S(���Nt���Darwint���/(���R!���R���t���platformt���systemR���t���patht���basenameR#���(���R���t���dlnamet
���dlbasenamet���libdir(����(����so���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pyt���extract_libtool_shlibl���s����c���������C���sq���t��|����}�|�d��k�r+�t�d�|������n��t�j�j�t�j�j�|����d�|���}�|�j�d�d���j�d�d���}�|�S(���Ns'���%s has no dlname. Not a shared library?s���.libss���.libs/.libss���.libs\.libs(���R!���R���t
���ValueErrorR���R(���t���joint���dirnamet���replace(���R���R*���t���libname(����(����so���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pyt���extract_libtool~���s����c���������C���s����|��j��}�|�s�d��S|��j�}�|�r0�|�j�d���Sd�}�t�j����d�k�rQ�d�}�n��y&�t�j�|�d�g�d�t�t	�j
����Wn�t�j�t�f�k
�r��d��SX|�g�S(���Nt��� t���libtoolR$���t���glibtools	���--versiont���stdout(
���t	���nolibtoolR���t���libtool_pathR���R&���R'���t
���subprocesst
���check_callR���R���t���devnullt���CalledProcessErrort���OSError(���t���optionst���libtool_infectionR9���t���libtool_cmd(����(����so���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pyt���get_libtool_command����s����
	
	c���������C���s����t��|����}�t��|���}�|�j�d���}�|�j�d���}�x:�|�|�k�rr�|�d�k�rr�|�j�d���}�|�j�d���}�q9�W|�j����|�j����|�|�k�S(���Ni� ��R���(���R���R���R���(���t���path1t���path2t���f1t���f2t���buf1t���buf2(����(����so���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pyt���files_are_identical����s����

c���������C���s+���|��j��d���s�|��Sd�t�j�j�|��d���S(���Ns���-Ii���(���t
���startswithR���R(���t���realpath(���t���cflag(����(����so���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pyt���cflag_real_include_path����s����c���������C���s����d����}�d����}�t��j�j�|����\�}�}�|�rf�|�|����r@�|��St��j�d�k�r��|�|����r��|��d�Sn{�xx�t��j�d�j�t��j���D]]�}�|�j�d���}�t��j�j�|�|����}�|�|���r��|�St��j�d�k�r��|�|���r��|�d�Sq��Wd��S(���Nc���������S���s%���t��j�j�|����o$�t��j�|��t��j���S(���N(���R���R(���t���isfilet���accesst���X_OK(���t���fpath(����(����so���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pyt���is_exe����s����c���������S���sC���|��j�����j�d���oB�t�j�j�|��d���oB�t�j�|��d�t�j���S(���Ns���.exe(���t���lowert���endswithR���R(���RN���RO���RP���(���RQ���(����(����so���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pyt	���is_nt_exe����s����t���nts���.exet���PATHt���"(	���R���R(���R���R���R���t���pathsept���stripR/���R���(���t���programRR���RU���RQ���t���fnameR(���t���exe_file(����(����so���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pyt���which����s ����		 (���t���reR���R:���R&���R���R���R���R���t���compileR���R���R���R���R���R���R!���R"���R#���R-���R3���RB���RI���RM���R^���(����(����(����so���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/utils.pyt���<module>���s*���