Zc@@sddlmZddlZddlZddlZddlmZddlZddlm Z m Z ddlm Z ddl m Z ddlmZe jZiZed Zd Zd efd YZdS( i(tabsolute_importN(tcontextmanageri(t RepositorytRepositoryError(t PyGIWarning(tget_introspection_module(tload_overridescc@stj|}dV|rdS|d kr.dStj|dk rGdStj|}tjdi|d6|d6td|dS( sOA context manager which tries to give helpful warnings about missing gi.require_version() which could potentially break code if only an older version than expected is installed or a new version gets introduced. :: with _check_require_version("Gtk", stacklevel): load_namespace_and_overrides() NtGLibtGObjecttGios%(namespace)s was imported without specifying a version first. Use gi.require_version('%(namespace)s', '%(version)s') before import to ensure that the right version gets loaded.t namespacetversiont stacklevel(RRR ( t repositoryt is_registeredtgitget_required_versiontNonet get_versiontwarningstwarnR(R R t was_loadedR ((s1/usr/lib64/python2.7/site-packages/gi/importer.pyt_check_require_version+s  cC@smtjd }|dkr'|r#dSdS|dkrA|r=dSdS|d kr[|rWdSdS|redSdSdS( s2Returns the stacklevel value for warnings.warn() for when the warning gets emitted by an imported module, but the warning should point at the code doing the import. Pass import_hook=True if the warning gets generated by an import hook (warn() gets called in load_module(), see PEP302) iiiii N(ii(ii(ii(tsyst version_info(t import_hookt py_version((s1/usr/lib64/python2.7/site-packages/gi/importer.pytget_import_stacklevelRs    tDynamicImportercB@s&eZdZddZdZRS(cC@s ||_dS(N(tpath(tselfR((s1/usr/lib64/python2.7/site-packages/gi/importer.pyt__init__lscC@sw|j|jsdS|jdd\}}||jkrAdStj|s_tj|rc|Std|dS(Nt.is6cannot import name %s, introspection typelib not found(t startswithRtrsplitR Rtenumerate_versionst ImportError(RtfullnameRR ((s1/usr/lib64/python2.7/site-packages/gi/importer.pyt find_moduleosc C@s|tjkrtj|S|jdd\}}tdt}t|d|{yt|}Wntk r}t|nXx5t j |D]$}t j d|j ddqWt|}WdQXd||_||_|tj|<|S( NR iRR sgi.repository.t-is<%s>(RtmodulesR"RtTrueRRRR$R tget_immediate_dependenciest importlibt import_moduletsplitRt__file__t __loader__( RR%RR R tintrospection_moduletetdeptdynamic_module((s1/usr/lib64/python2.7/site-packages/gi/importer.pyt load_modules  "   N(t__name__t __module__RRR&R4(((s1/usr/lib64/python2.7/site-packages/gi/importer.pyRhs  (t __future__RRRR+t contextlibRRt_giRRRtmoduleRt overridesRt get_defaultR R(RRtobjectR(((s1/usr/lib64/python2.7/site-packages/gi/importer.pyts     '