/usr/lib64/python3.9/importlib/__pycache__
NameSizeModeActions
abc.cpython-39.opt-1.pyc168170644editdlrm
abc.cpython-39.opt-2.pyc92540644editdlrm
abc.cpython-39.pyc168170644editdlrm
machinery.cpython-39.opt-1.pyc9640644editdlrm
machinery.cpython-39.opt-2.pyc8240644editdlrm
machinery.cpython-39.pyc9640644editdlrm
metadata.cpython-39.opt-1.pyc221740644editdlrm
metadata.cpython-39.opt-2.pyc160460644editdlrm
metadata.cpython-39.pyc221740644editdlrm
resources.cpython-39.opt-1.pyc63910644editdlrm
resources.cpython-39.opt-2.pyc49690644editdlrm
resources.cpython-39.pyc63910644editdlrm
util.cpython-39.opt-1.pyc93220644editdlrm
util.cpython-39.opt-2.pyc64530644editdlrm
util.cpython-39.pyc93220644editdlrm
_bootstrap.cpython-39.opt-1.pyc289520644editdlrm
_bootstrap.cpython-39.opt-2.pyc221930644editdlrm
_bootstrap.cpython-39.pyc289680644editdlrm
_bootstrap_external.cpython-39.opt-1.pyc458320644editdlrm
_bootstrap_external.cpython-39.opt-2.pyc345520644editdlrm
_bootstrap_external.cpython-39.pyc462440644editdlrm
_common.cpython-39.opt-1.pyc16990644editdlrm
_common.cpython-39.opt-2.pyc14600644editdlrm
_common.cpython-39.pyc16990644editdlrm
__init__.cpython-39.opt-1.pyc38330644editdlrm
__init__.cpython-39.opt-2.pyc31540644editdlrm
__init__.cpython-39.pyc38330644editdlrm
Edit: /usr/lib64/python3.9/importlib/__pycache__/metadata.cpython-39.opt-1.pyc (22174B)
a ´i>Iã@s’ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z ddl Z ddlmZddlmZddlmZddlmZddl mZgd¢ZGdd „d eƒZGd d „d e  d d ¡ƒZGdd„dejƒZGdd„dƒZGdd„dƒZGdd„deƒZ Gdd„dƒZ!Gdd„dƒZ"Gdd„de ƒZ#Gdd„deƒZ$dd„Z%d d!„Z&d"d#„Z'd$d%„Z(d&d'„Z)d(d)„Z*d*d+„Z+dS),éN)Ú ConfigParser)Úsuppress)Ú import_module)ÚMetaPathFinder)Ústarmap) Ú DistributionÚDistributionFinderÚPackageNotFoundErrorÚ distributionÚ distributionsÚ entry_pointsÚfilesÚmetadataÚrequiresÚversionc@seZdZdZdS)r zThe package was not found.N)Ú__name__Ú __module__Ú __qualname__Ú__doc__©rrú*/usr/lib64/python3.9/importlib/metadata.pyr %sr c@sneZdZdZe d¡Zdd„Zedd„ƒZ edd„ƒZ ed d „ƒZ e d d „ƒZ e d d„ƒZdd„Zdd„ZdS)Ú EntryPointa An entry point as defined by Python packaging conventions. See `the packaging docs on entry points `_ for more information. >>> ep = EntryPoint( ... name=None, group=None, value='package.module:attr [extra1, extra2]') >>> ep.module 'package.module' >>> ep.attr 'attr' >>> ep.extras ['extra1', 'extra2'] zH(?P[\w.]+)\s*(:\s*(?P[\w.]+)\s*)?((?P\[.*\])\s*)?$cCsD|j |j¡}t| d¡ƒ}td| d¡p,d d¡ƒ}t t ||¡S)z¦Load the entry point from its definition. If only a module is indicated by the value, return that module. Otherwise, return the named object. ÚmoduleNÚattrÚÚ.) ÚpatternÚmatchÚvaluerÚgroupÚfilterÚsplitÚ functoolsÚreduceÚgetattr)ÚselfrrÚattrsrrrÚloadPszEntryPoint.loadcCs|j |j¡}| d¡S)Nr©rrrr©r%rrrrrZszEntryPoint.modulecCs|j |j¡}| d¡S)Nrr(r)rrrr_szEntryPoint.attrcCs$|j |j¡}t d| d¡p d¡S)Nz\w+Úextrasr)rrrÚreÚfindallrr)rrrr*dszEntryPoint.extrascs‡‡fdd„ˆ ¡DƒS)Ncs,g|]$}ˆ |¡D]\}}ˆ|||ƒ‘qqSr©Úitems)Ú.0rÚnamer©ÚclsÚconfigrrÚ ksþz+EntryPoint._from_config..)Úsectionsr1rr1rÚ _from_configis þzEntryPoint._from_configcCsLtdd�}t|_z| |¡Wn"ty@| t |¡¡Yn0t  |¡S)Nú=)Z delimiters) rÚstrZ optionxformZ read_stringÚAttributeErrorZreadfpÚioÚStringIOrr6)r2Útextr3rrrÚ _from_textqs  zEntryPoint._from_textcCst|j|fƒS)zO Supply iter so one may construct dicts of EntryPoints easily. )Úiterr0©r%rrrÚ__iter__}szEntryPoint.__iter__cCs|j|j|j|jffS©N)Ú __class__r0rrr?rrrÚ __reduce__ƒsþzEntryPoint.__reduce__N)rrrrr+Úcompilerr'Úpropertyrrr*Ú classmethodr6r=r@rCrrrrr)s"ÿ      rZEntryPointBasezname value groupc@s*eZdZdZd dd„Zdd„Zdd„Zd S) Ú PackagePathz"A reference to a path in a packageúutf-8cCs<| ¡j|d��}| ¡WdƒS1s.0YdS)N©Úencoding©ÚlocateÚopenÚread)r%rJÚstreamrrrÚ read_text�szPackagePath.read_textcCs:| ¡ d¡�}| ¡WdƒS1s,0YdS)NÚrbrK)r%rOrrrÚ read_binary‘szPackagePath.read_binarycCs |j |¡S)z'Return a path-like object for this path)ÚdistÚ locate_filer?rrrrL•szPackagePath.locateN)rH)rrrrrPrRrLrrrrrGŠs rGc@seZdZdd„Zdd„ZdS)ÚFileHashcCs| d¡\|_}|_dS)Nr7)Ú partitionÚmoder)r%ÚspecÚ_rrrÚ__init__›szFileHash.__init__cCsd |j|j¡S)Nz)ÚformatrWrr?rrrÚ__repr__žszFileHash.__repr__N)rrrrZr\rrrrrUšsrUc@sêeZdZdZejdd„ƒZejdd„ƒZedd„ƒZ edd „ƒZ e d d „ƒZ e d d „ƒZ ed*dd„ƒZedd„ƒZedd„ƒZedd„ƒZedd„ƒZdd„Zdd„Zedd„ƒZdd „Zd!d"„Zed#d$„ƒZe d%d&„ƒZe d'd(„ƒZd)S)+rzA Python distribution package.cCsdS)z¶Attempt to load metadata file given by the name. :param filename: The name of the file in the distribution info. :return: The text if found, otherwise None. Nr©r%ÚfilenamerrrrP¥szDistribution.read_textcCsdS)z[ Given a path to a file in this distribution, return a path to it. Nr©r%ÚpathrrrrT­szDistribution.locate_filecCsH| ¡D]2}|tj|d�ƒ}tt|ƒdƒ}|dur|Sqt|ƒ‚dS)afReturn the Distribution for the given package name. :param name: The name of the distribution package to search for. :return: The Distribution instance (or subclass thereof) for the named package, if found. :raises PackageNotFoundError: When the named package's distribution metadata cannot be found. ©r0N)Ú_discover_resolversrÚContextÚnextr>r )r2r0ÚresolverZdistsrSrrrÚ from_name´s  zDistribution.from_namec sN| dd¡‰ˆr|rtdƒ‚ˆp.tjfi|¤Ž‰tj ‡fdd„| ¡Dƒ¡S)aReturn an iterable of Distribution objects for all packages. Pass a ``context`` or pass keyword arguments for constructing a context. :context: A ``DistributionFinder.Context`` object. :return: Iterable of Distribution objects for all packages. ÚcontextNz cannot accept context and kwargsc3s|]}|ˆƒVqdSrAr)r/re©rgrrÚ Ôsÿz(Distribution.discover..)ÚpopÚ ValueErrorrrcÚ itertoolsÚchainÚ from_iterablerb)r2ÚkwargsrrhrÚdiscoverÆs þzDistribution.discovercCstt |¡ƒS)z°Return a Distribution for the indicated metadata path :param path: a string or path-like object :return: a concrete Distribution instance for the path )ÚPathDistributionÚpathlibÚPath)r`rrrÚatÙszDistribution.atcCsdd„tjDƒ}td|ƒS)z#Search the meta_path for resolvers.css|]}t|ddƒVqdS)Úfind_distributionsN)r$)r/Úfinderrrrriåsÿz3Distribution._discover_resolvers..N)ÚsysÚ meta_pathr )Zdeclaredrrrrbâsþz Distribution._discover_resolversrcCs@ddlm}m}| |¡}tj|j||d�}tt |  |¡¡ƒS)Nr)ÚbuildÚmeta)Z source_dirÚsystem) Zpep517ryrzZ compat_systemr"ÚpartialrqÚzipfilersZ build_as_zip)r2Úrootryrzr{ZbuilderrrrÚ_localës ýzDistribution._localcCs(| d¡p| d¡p| d¡}t |¡S)z°Return the parsed metadata for this Distribution. The returned object will have keys that name the various bits of metadata. See PEP 566 for details. ZMETADATAzPKG-INFOr)rPÚemailZmessage_from_string©r%r<rrrrös  ÿúzDistribution.metadatacCs |jdS)z;Return the 'Version' metadata for the distribution package.ZVersion)rr?rrrrszDistribution.versioncCst | d¡¡S)Nzentry_points.txt)rr=rPr?rrrr szDistribution.entry_pointscs6ˆ ¡pˆ ¡}d‡fdd„ }|o4tt|t |¡ƒƒS)aBFiles in this distribution. :return: List of PackagePath for this distribution or None Result is `None` if the metadata file that enumerates files (i.e. RECORD for dist-info or SOURCES.txt for egg-info) is missing. Result may be empty if the metadata exists but is empty. Ncs6t|ƒ}|rt|ƒnd|_|r&t|ƒnd|_ˆ|_|SrA)rGrUÚhashÚintÚsizerS)r0r‚Zsize_strÚresultr?rrÚ make_files z%Distribution.files..make_file)NN)Ú_read_files_distinfoÚ_read_files_egginfoÚlistrÚcsvÚreader)r%Z file_linesr†rr?rr s zDistribution.filescCs| d¡}|o| ¡S)z* Read the lines of RECORD ZRECORD)rPÚ splitlinesr�rrrr‡&s z!Distribution._read_files_distinfocCs| d¡}|otdj| ¡ƒS)z` SOURCES.txt might contain literal commas, so wrap each line in quotes. z SOURCES.txtz"{}")rPÚmapr[rŒr�rrrrˆ-s z Distribution._read_files_egginfocCs| ¡p| ¡}|ot|ƒS)z6Generated requirements specified for this Distribution)Ú_read_dist_info_reqsÚ_read_egg_info_reqsr‰)r%Zreqsrrrr5szDistribution.requirescCs |j d¡S)Nz Requires-Dist)rZget_allr?rrrrŽ;sz!Distribution._read_dist_info_reqscCs | d¡}|durdS| |¡S)Nz requires.txt)rPÚ_deps_from_requires_text)r%Úsourcerrrr�>s z Distribution._read_egg_info_reqscCs4| | ¡¡}dd„t |t d¡¡Dƒ}| |¡S)NcSs&i|]\}}|ttt d¡|ƒƒ“qS)Úline)r‰r�ÚoperatorÚ itemgetter)r/ÚsectionÚresultsrrrÚ Esÿz9Distribution._deps_from_requires_text..r•)Ú_read_sectionsrŒrlÚgroupbyr“r”Ú%_convert_egg_info_reqs_to_simple_reqs)r2r‘Z section_pairsr5rrrr�Bs ýz%Distribution._deps_from_requires_textccs<d}td|ƒD](}t d|¡}|r.| d¡}qtƒVqdS)Nz \[(.*)\]$é)r r+rrÚlocals)Úlinesr•r’Z section_matchrrrr˜Ls  zDistribution._read_sectionsc#sVdd„‰‡fdd„}dd„}| ¡D],\}}|D]}||ƒ}||||ƒVq0q$dS)aÄ Historically, setuptools would solicit and store 'extra' requirements, including those with environment markers, in separate sections. More modern tools expect each dependency to be defined separately, with any relevant extras and environment markers attached directly to that requirement. This method converts the former to the latter. See _test_deps_from_requires_text for an example. cSs|odj|d�S)Nzextra == "{name}"ra)r[rarrrÚmake_conditionaszJDistribution._convert_egg_info_reqs_to_simple_reqs..make_conditioncsX|pd}| d¡\}}}|r,|r,d|›d�}ttd|ˆ|ƒgƒƒ}|rTdd |¡SdS)Nrú:ú(ú)z; z and )rVr‰r Újoin)r•ÚextraÚsepZmarkersZ conditions©ržrrÚ quoted_markerds  zIDistribution._convert_egg_info_reqs_to_simple_reqs..quoted_markercSs dd|vS)z� PEP 508 requires a space between the url_spec and the quoted_marker. Ref python/importlib_metadata#357. ú ú@r)ZreqrrrÚ url_req_spacelszIDistribution._convert_egg_info_reqs_to_simple_reqs..url_req_spaceNr-)r5r¦r©r•ZdepsZdepÚspacerr¥rršVs  z2Distribution._convert_egg_info_reqs_to_simple_reqsN)r)rrrrÚabcÚabstractmethodrPrTrFrfrpÚ staticmethodrtrbrrErrr r r‡rˆrrŽr�r�r˜ršrrrrr¢sF              rc@s2eZdZdZGdd„dƒZejeƒfdd„ƒZdS)rzJ A MetaPathFinder capable of discovering installed distributions. c@s(eZdZdZdZdd„Zedd„ƒZdS)zDistributionFinder.Contextaw Keyword arguments presented by the caller to ``distributions()`` or ``Distribution.discover()`` to narrow the scope of a search for distributions in all DistributionFinders. Each DistributionFinder may expect any parameters and should attempt to honor the canonical parameters defined below when appropriate. NcKst|ƒ |¡dSrA)ÚvarsÚupdate)r%rorrrrZ‘sz#DistributionFinder.Context.__init__cCst|ƒ dtj¡S)z¬ The path that a distribution finder should search. Typically refers to Python package paths and defaults to ``sys.path``. r`)r®Úgetrwr`r?rrrr`”szDistributionFinder.Context.path)rrrrr0rZrEr`rrrrrcs  rccCsdS)zÝ Find distributions. Return an iterable of all Distribution instances capable of loading the metadata for packages matching the ``context``, a DistributionFinder.Context instance. Nr)r%rgrrrružsz%DistributionFinder.find_distributionsN)rrrrrcr«r¬rurrrrrzsrc@s@eZdZdZdd„Zdd„Zdd„Zdd „Zd d „Zd d „Z dS)ÚFastPathzF Micro-optimized class for searching a path for children. cCs||_tj |j¡ ¡|_dSrA)r~Úosr`ÚbasenameÚlowerÚbase)r%r~rrrrZ¯szFastPath.__init__cCst |j|¡SrA)rrrsr~)r%ÚchildrrrÚjoinpath³szFastPath.joinpathcCslttƒ� t |jpd¡WdƒS1s.0Yttƒ�| ¡WdƒS1s^0YgS)Nr)rÚ Exceptionr²Úlistdirr~Ú zip_childrenr?rrrÚchildren¶s  . &zFastPath.childrencCs2t |j¡}|j ¡}|j|_t dd„|Dƒ¡S)Ncss |]}| tjd¡dVqdS)r›rN)r!Ú posixpathr¤)r/r¶rrrriÂsÿz(FastPath.zip_children..)r}rsr~Znamelistr·ÚdictÚfromkeys)r%Zzip_pathÚnamesrrrrº½s    þzFastPath.zip_childrencCs&|j}||jkp$| |j¡o$| d¡S)Nú.egg)rµÚversionless_egg_nameÚ startswithÚprefixÚendswith)r%ÚsearchrµrrrÚis_eggÇs   ýzFastPath.is_eggccsZ| ¡D]L}| ¡}||jvsH| |j¡r6| |j¡sH| |¡r|dkr| |¡VqdS)Nzegg-info) r»r´Ú exact_matchesrÂrÃrÄÚsuffixesrÆr·)r%r0r¶Zn_lowrrrrÅÎs   ÿ þüüzFastPath.searchN) rrrrrZr·r»rºrÆrÅrrrrr±©s r±c@s6eZdZdZdZdZdZdgdd…ZdZdd„Z dS)ÚPreparedzE A prepared search for metadata on a possibly-named package. r)z .dist-infoz .egg-infoNrcsV|ˆ_|durdS| ¡ dd¡ˆ_ˆjdˆ_‡fdd„ˆjDƒˆ_ˆjdˆ_dS)Nú-rYcsg|]}ˆj|‘qSr)Ú normalized)r/Úsuffixr?rrr4ész%Prepared.__init__..rÀ)r0r´ÚreplacerËrÃrÈrÇrÁ)r%r0rr?rrZãs  ÿzPrepared.__init__) rrrrrËrÃrÈrÇrÁrZrrrrrÉÙsrÉc@s,eZdZee ¡fdd„ƒZedd„ƒZdS)ÚMetadataPathFindercCs| |j|j¡}tt|ƒS)a  Find distributions. Return an iterable of all Distribution instances capable of loading the metadata for packages matching ``context.name`` (or all names if ``None`` indicated) along the paths in the list of directories ``context.path``. )Ú _search_pathsr0r`r�rq)r2rgÚfoundrrrruïs z%MetadataPathFinder.find_distributionscs tj ‡fdd„tt|ƒDƒ¡S)z1Find metadata directories in paths heuristically.c3s|]}| tˆƒ¡VqdSrA)rÅrÉ)r/r`rarrriÿsÿz3MetadataPathFinder._search_paths..)rlrmrnr�r±)r2r0ÚpathsrrarrÏüsþz MetadataPathFinder._search_pathsN)rrrrFrrcrurÏrrrrrÎîs rÎc@s.eZdZdd„Zdd„Zejje_dd„ZdS)rqcCs ||_dS)zÐConstruct a distribution from a path to the metadata directory. :param path: A pathlib.Path or similar object supporting .joinpath(), __div__, .parent, and .read_text(). N)Ú_pathr_rrrrZszPathDistribution.__init__cCsHttttttƒ�$|j |¡jdd�WdƒS1s:0YdS)NrHrI) rÚFileNotFoundErrorÚIsADirectoryErrorÚKeyErrorÚNotADirectoryErrorÚPermissionErrorrÒr·rPr]rrrrPsÿzPathDistribution.read_textcCs |jj|SrA)rÒÚparentr_rrrrTszPathDistribution.locate_fileN)rrrrZrPrrrTrrrrrqs rqcCs t |¡S)zÎGet the ``Distribution`` instance for the named package. :param distribution_name: The name of the distribution package as a string. :return: A ``Distribution`` instance (or subclass thereof). )rrf©Zdistribution_namerrrr sr cKstjfi|¤ŽS)z|Get all ``Distribution`` instances in the current environment. :return: An iterable of ``Distribution`` instances. )rrp)rorrrr !sr cCs t |¡jS)z¸Get the metadata for the named package. :param distribution_name: The name of the distribution package to query. :return: An email.Message containing the parsed metadata. )rrfrrÙrrrr)srcCs t|ƒjS)zìGet the version string for the named package. :param distribution_name: The name of the distribution package to query. :return: The version string for the package as defined in the package's "Version" metadata key. )r rrÙrrrr2srcCsHtj dd„tƒDƒ¡}t d¡}t||d�}t ||¡}dd„|DƒS)zwReturn EntryPoint objects for all installed packages. :return: EntryPoint objects for all installed packages. css|] }|jVqdSrA)r )r/rSrrrriAszentry_points..r)ÚkeycSsi|]\}}|t|ƒ“qSr)Útuple)r/rÚepsrrrr—Fsÿz entry_points..)rlrmrnr r“Ú attrgetterÚsortedr™)rÜZby_groupZorderedZgroupedrrrr <s ÿ   þr cCs t|ƒjS)z·Return a list of files for the named package. :param distribution_name: The name of the distribution package to query. :return: List of files composing the distribution. )r r rÙrrrr Lsr cCs t|ƒjS)z� Return a list of requirements for the named package. :return: An iterator of requirements, suitable for packaging.requirement.Requirement. )r rrÙrrrrUsr),r:r²r+r«rŠrwr€rrr}r“r"rlr¼Ú collectionsÚ configparserrÚ contextlibrÚ importlibrÚ importlib.abcrrÚ__all__ÚModuleNotFoundErrorr Ú namedtuplerÚ PurePosixPathrGrUrrr±rÉrÎrqr r rrr r rrrrrÚsN       ÿaY/0