ó ï�Rec@s6dZddlmZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl m Z mZddlmZddlmZmZddlmZmZmZmZdd lmZmZmZmZmZmZm Z d d d d dgZ!ej"e#ƒZ$dZ%dZ&deddde%dfZ'dZ(de)fd„ƒYZ*de)fd„ƒYZ+de)fd„ƒYZ,de,fd„ƒYZ-de-fd „ƒYZ.d!e-fd"„ƒYZ/e.Z0e/Z1d#e)fd$„ƒYZ2d%d&„Z3d'„Z4d(„Z5d)„Z6dS(*uPEP 376 implementation.iÿÿÿÿ(tunicode_literalsNi(tDistlibExceptiont resources(tStringIO(t get_schemetUnsupportedVersionError(tMetadatatMETADATA_FILENAMEtWHEEL_METADATA_FILENAMEtLEGACY_METADATA_FILENAME(tparse_requirementtcached_propertytparse_name_and_versiont read_exportst write_exportst CSVReadert CSVWriteru DistributionuBaseInstalledDistributionuInstalledDistributionuEggInfoDistributionuDistributionPathupydist-exports.jsonupydist-commands.jsonu INSTALLERuRECORDu REQUESTEDu RESOURCESuSHAREDu .dist-infot_CachecBs)eZdZd„Zd„Zd„ZRS(uL A simple cache mapping names and .dist-info paths to distributions cCsi|_i|_t|_dS(uZ Initialise an instance. There is normally one for each DistributionPath. N(tnametpathtFalset generated(tself((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyt__init__1s  cCs'|jjƒ|jjƒt|_dS(uC Clear the cache, setting it to its initial state. N(RtclearRRR(R((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyR9s  cCsH|j|jkrD||j|j<|jj|jgƒj|ƒndS(u` Add a distribution to the cache. :param dist: The distribution to add. N(RRt setdefaulttkeytappend(Rtdist((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pytaddAs(t__name__t __module__t__doc__RRR(((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyR-s  tDistributionPathcBs›eZdZd ed„Zd„Zd„ZeeeƒZ d„Z d„Z d„Z e d„ƒZd„Zd „Zd d „Zd „Zd d „ZRS(uU Represents a set of distributions installed on a path (typically sys.path). cCsg|dkrtj}n||_t|_||_tƒ|_tƒ|_t|_ t dƒ|_ dS(u  Create an instance from a path, optionally including legacy (distutils/ setuptools/distribute) distributions. :param path: The path to use, as a list of directories. If not specified, sys.path is used. :param include_egg: If True, this instance will look for and return legacy distributions as well as those based on PEP 376. udefaultN( tNonetsysRtTruet _include_distt _include_eggRt_cachet _cache_eggt_cache_enabledRt_scheme(RRt include_egg((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyROs        cCs|jS(N(R)(R((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyt_get_cache_enabledcscCs ||_dS(N(R)(Rtvalue((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyt_set_cache_enabledfscCs|jjƒ|jjƒdS(u, Clears the internal cache. N(R'RR((R((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyt clear_cacheks c csÛtƒ}xË|jD]À}tj|ƒ}|dkr:qn|jdƒ}| s|j r`qnt|jƒ}xa|D]Y}|j|ƒ}| sv|j|kr§qvn|jr€|j t ƒr€t t t g}x<|D]1}tj||ƒ} |j| ƒ} | rÕPqÕqÕWqvtj| jƒƒ�} td| ddƒ} WdQXtjd|jƒ|j|jƒt|jd| d|ƒVqv|jrv|j d ƒrvtjd|jƒ|j|jƒt|j|ƒVqvqvWqWdS( uD Yield .dist-info and/or .egg(-info) distributions. utfileobjtschemeulegacyNuFound %stmetadatatenvu .egg-infou.egg(u .egg-infou.egg(tsetRRtfinder_for_pathR"tfindt is_containertsortedR%tendswitht DISTINFO_EXTRRR t posixpathtjoint contextlibtclosingt as_streamRtloggertdebugRtnew_dist_classR&told_dist_class( RtseenRtfindertrtrsettentrytpossible_filenamestmetadata_filenamet metadata_pathtpydisttstreamR2((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyt_yield_distributionsssD       cCs©|jj }|jo |jj }|s/|r¥xF|jƒD]8}t|tƒrd|jj|ƒq<|jj|ƒq<W|r�t|j_n|r¥t|j_q¥ndS(uk Scan the path for distributions and populate the cache with those that are found. N( R'RR&R(RNt isinstancetInstalledDistributionRR$(Rtgen_disttgen_eggR((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyt_generate_cacheŸs  cCs)|jddƒ}dj||gƒtS(uo The *name* and *version* parameters are converted into their filename-escaped form, i.e. any ``'-'`` characters are replaced with ``'_'`` other than the one in ``'dist-info'`` and the one separating the name from the version number. :parameter name: is converted to a standard distribution name by replacing any runs of non- alphanumeric characters with a single ``'-'``. :type name: string :parameter version: is converted to a standard version string. Spaces become dots, and all other non-alphanumeric characters (except dots) become dashes, with runs of multiple dashes condensed to a single dash. :type version: string :returns: directory name :rtype: stringu-u_(treplaceR<R:(tclsRtversion((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pytdistinfo_dirname²sccs†|js(xv|jƒD] }|VqWnZ|jƒx|jjjƒD] }|VqEW|jr‚x"|jjjƒD] }|VqpWndS(u5 Provides an iterator that looks for distributions and returns :class:`InstalledDistribution` or :class:`EggInfoDistribution` instances for each one of them. :rtype: iterator of :class:`InstalledDistribution` and :class:`EggInfoDistribution` instances N(R)RNRSR'RtvaluesR&R((RR((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pytget_distributionsÈs     cCs·d}|jƒ}|jsNx•|jƒD]}|j|kr(|}Pq(q(Wne|jƒ||jjkr�|jj|d}n2|jr³||j jkr³|j j|d}n|S(u= Looks for a named distribution on the path. This function only returns the first result found, as no more than one value is expected. If nothing is found, ``None`` is returned. :rtype: :class:`InstalledDistribution`, :class:`EggInfoDistribution` or ``None`` iN( R"tlowerR)RNRRSR'RR&R((RRtresultR((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pytget_distributionÞs     c csd}|dk r_y |jjd||fƒ}Wq_tk r[td||fƒ‚q_Xnxª|jƒD]œ}t|dƒs”tjd|ƒql|j }xh|D]`}t |ƒ\}}|dkrà||kr|VPqq¤||kr¤|j |ƒr¤|VPq¤q¤WqlWdS(u Iterates over all distributions to find which distributions provide *name*. If a *version* is provided, it will be used to filter the results. This function only returns the first result found, since no more than one values are expected. If the directory is not found, returns ``None``. :parameter version: a version specifier that indicates the version required, conforming to the format in ``PEP-345`` :type name: string :type version: string u%s (%s)uinvalid name or version: %r, %ruprovidesuNo "provides": %sN( R"R*tmatchert ValueErrorRRYthasattrR@RAtprovidesR tmatch( RRRVR]Rtprovidedtptp_nametp_ver((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pytprovides_distributionøs(       cCs;|j|ƒ}|dkr.td|ƒ‚n|j|ƒS(u5 Return the path to a resource file. uno distribution named %r foundN(R\R"t LookupErrortget_resource_path(RRt relative_pathR((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyt get_file_path!s ccs€xy|jƒD]k}|j}||kr ||}|dk rY||kru||Vquqxx|jƒD] }|VqfWq q WdS(uÙ Return all of the exported entries in a particular category. :param category: The category to search for entries. :param name: If specified, only entries with that name are returned. N(RYtexportsR"RX(RtcategoryRRRFtdtv((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pytget_exported_entries*s     N(RRR R"RRR,R.tpropertyt cache_enabledR/RNRSt classmethodRWRYR\RfRjRo(((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyR!Ks    ,    ) t DistributioncBsÎeZdZeZeZd„Zed„ƒZeZ ed„ƒZ ed„ƒZ d„Z ed„ƒZ ed„ƒZed„ƒZed „ƒZed „ƒZd „Zd „Zd „Zd„ZRS(uª A base class for distributions, whether installed or from indexes. Either way, it must have some metadata, so that's all that's needed for construction. cCsp||_|j|_|jjƒ|_|j|_d|_d|_d|_d|_ t ƒ|_ i|_ dS(uŠ Initialise an instance. :param metadata: The instance of :class:`Metadata` describing this distribution. N( R2RRZRRVR"tlocatortdigesttextrastcontextR4t download_urlstdigests(RR2((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyROs        cCs |jjS(uH The source archive download URL for this distribution. (R2t source_url(R((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyRz`scCsd|j|jfS(uX A utility property which displays the name and version in parentheses. u%s (%s)(RRV(R((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pytname_and_versioniscCsB|jj}d|j|jf}||kr>|j|ƒn|S(u� A set of distribution names and versions provided by this distribution. :return: A set of "name (version)" strings. u%s (%s)(R2R`RRVR(Rtplistts((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyR`ps   cCsS|j}tjd|jƒƒt||ƒ}t|j|d|jd|jƒƒS(Nu%Getting requirements from metadata %rRvR3( R2R@RAttodicttgetattrR4tget_requirementsRvRw(Rtreq_attrtmdtreqts((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyt_get_requirements|s  cCs |jdƒS(Nu run_requires(R„(R((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyt run_requiresƒscCs |jdƒS(Nu meta_requires(R„(R((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyt meta_requires‡scCs |jdƒS(Nubuild_requires(R„(R((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pytbuild_requires‹scCs |jdƒS(Nu test_requires(R„(R((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyt test_requires�scCs |jdƒS(Nu dev_requires(R„(R((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyt dev_requires“sc Csêt|ƒ}t|jjƒ}y|j|jƒ}Wn@tk rvtjd|ƒ|j ƒd}|j|ƒ}nX|j }t }x]|j D]R}t |ƒ\}} ||krºq�ny|j| ƒ}PWq�tk ráq�Xq�W|S(u¿ Say if this instance matches (fulfills) a requirement. :param req: The requirement to match. :rtype req: str :return: True if it matches, else False. u+could not read version %r - using name onlyi(R RR2R1R]t requirementRR@twarningtsplitRRR`R Ra( RtreqRFR1R]RR[RcRdRe((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pytmatches_requirement—s*      cCs6|jrd|j}nd}d|j|j|fS(uC Return a textual representation of this instance, u [%s]uu(RzRRV(Rtsuffix((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyt__repr__¹s cCs[t|ƒt|ƒk r!t}n6|j|jkoT|j|jkoT|j|jk}|S(u< See if this distribution is the same as another. :param other: The distribution to compare with. To be equal to one another. distributions must have the same type, name, version and source_url. :return: True if it is the same, else False. (ttypeRRRVRz(RtotherR[((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyt__eq__Ãs  cCs't|jƒt|jƒt|jƒS(uH Compute hash in a way which matches the equality test. (thashRRVRz(R((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyt__hash__Ós(RRR Rtbuild_time_dependencyt requestedRRpRzt download_urlR{R`R„R…R†R‡RˆR‰RŽR�R“R•(((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyRs=s$   " tBaseInstalledDistributioncBs,eZdZdZdd„Zdd„ZRS(u] This is the base class for installed distributions (whether PEP 376 or legacy). cCs,tt|ƒj|ƒ||_||_dS(u Initialise an instance. :param metadata: An instance of :class:`Metadata` which describes the distribution. This will normally have been initialised from a metadata file in the ``path``. :param path: The path of the ``.dist-info`` or ``.egg-info`` directory for the distribution. :param env: This is normally the :class:`DistributionPath` instance where this distribution was found. N(tsuperR™RRt dist_path(RR2RR3((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyRâs  cCs“|dkr|j}n|dkr6tj}d}ntt|ƒ}d|j}||ƒjƒ}tj|ƒjdƒj dƒ}d||fS(u” Get the hash of some data, using a particular hash algorithm, if specified. :param data: The data to be hashed. :type data: bytes :param hasher: The name of a hash implementation, supported by hashlib, or ``None``. Examples of valid values are ``'sha1'``, ``'sha224'``, ``'sha384'``, '``sha256'``, ``'md5'`` and ``'sha512'``. If no hasher is specified, the ``hasher`` attribute of the :class:`InstalledDistribution` instance is used. If the hasher is determined to be ``None``, MD5 is used as the hashing algorithm. :returns: The hash of the data. If a hasher was explicitly specified, the returned hash will be prefixed with the specified hasher followed by '='. :rtype: str uu%s=t=uasciiu%s%sN( R"thasherthashlibtmd5RRutbase64turlsafe_b64encodetrstriptdecode(RtdataR�tprefixRu((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pytget_hashñs      !N(RRR R"R�RR¦(((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyR™Ús RPcBsÎeZdZdZddd„Zd„Zd„Zd„Ze d„ƒZ d„Z d„Z d „Z d „Zed „Zd „Ze d „ƒZed„Zd„Zd„Zd„Zd„ZejZRS(u  Created with the *path* of the ``.dist-info`` directory provided to the constructor. It reads the metadata contained in ``pydist.json`` when it is instantiated., or uses a passed in Metadata instance (useful for when dry-run mode is being used). usha256c Csíg|_tj|ƒ|_}|dkr>td|ƒ‚n|ru|jru||jjkru|jj|j }n²|dkr'|j t ƒ}|dkr®|j t ƒ}n|dkrÌ|j t ƒ}n|dkrñtdt |fƒ‚ntj|jƒƒ�}td|ddƒ}WdQXntt|ƒj|||ƒ|re|jre|jj|ƒn|j dƒ}|dk |_tjj|dƒ}tjj|ƒrét|dƒ�}|jƒjd ƒ} WdQX| jƒ|_ndS( Nufinder unavailable for %suno %s found in %sR0R1ulegacyu REQUESTEDu top_level.txturbuutf-8(tmodulesRR5RER"R^R)R'RR2R6RRR R=R>R?RRšRPRRR—tosR<texiststopentreadR£t splitlines( RRR2R3RERFRMRctfR¤((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyRs6  !     cCsd|j|j|jfS(Nu#(RRVR(R((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyR�=scCsd|j|jfS(Nu%s %s(RRV(R((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyt__str__Asc Cs±g}|jdƒ}tj|jƒƒ��}td|ƒ�i}x_|D]W}gtt|ƒdƒD] }d^qb}||\}} } |j|| | fƒqFWWdQXWdQX|S(u" Get the list of installed files for the distribution :return: A list of tuples of path, hash and size. Note that hash and size might be ``None`` for some entries. The path is exactly as stored in the file (which is as in PEP 376). uRECORDRMiN( tget_distinfo_resourceR=R>R?RtrangetlenR"R( RtresultsRFRMt record_readertrowtitmissingRtchecksumtsize((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyt _get_recordsDs (&cCs.i}|jtƒ}|r*|jƒ}n|S(u Return the information exported by this distribution. :return: A dictionary of exports, mapping an export category to a dict of :class:`ExportEntry` instances describing the individual export entries, and keyed by name. (R¯tEXPORTS_FILENAMER (RR[RF((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyRk[s cCsLi}|jtƒ}|rHtj|jƒƒ�}t|ƒ}WdQXn|S(uý Read exports data from a file in .ini format. :return: A dictionary of exports, mapping an export category to a list of :class:`ExportEntry` instances describing the individual export entries. N(R¯RºR=R>R?R (RR[RFRM((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyR is cCs8|jtƒ}t|dƒ�}t||ƒWdQXdS(u Write a dictionary of exports to a file in .ini format. :param exports: A dictionary of exports, mapping an export category to a list of :class:`ExportEntry` instances describing the individual export entries. uwN(tget_distinfo_fileRºRªR(RRktrfR­((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyRxsc Cs€|jdƒ}tj|jƒƒ�F}td|ƒ�.}x$|D]\}}||kr@|Sq@WWdQXWdQXtd|ƒ‚dS(uW NOTE: This API may change in the future. Return the absolute path to a resource file with the given relative path. :param relative_path: The path, relative to .dist-info, of the resource of interest. :return: The absolute path where the resource is to be found. u RESOURCESRMNu3no resource file with relative path %r is installed(R¯R=R>R?RtKeyError(RRiRFRMtresources_readertrelativet destination((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyRhƒs  ccs x|jƒD] }|Vq WdS(uª Iterates over the ``RECORD`` entries and returns a tuple ``(path, hash, size)`` for each line. :returns: iterator of (path, hash, size) N(R¹(RR[((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pytlist_installed_files—sc Cs¡tjj|dƒ}tjj|jƒ}|j|ƒ}tjj|dƒ}|jdƒ}tjd|ƒ|rwdSt |ƒ�}xÑ|D]É}tjj |ƒs´|j d ƒrÁd} } nCdtjj |ƒ} t |dƒ�} |j| jƒƒ} WdQX|j|ƒs(|r@|j|ƒr@tjj||ƒ}n|j|| | fƒq�W|j|ƒr�tjj||ƒ}n|j|ddfƒWdQX|S( uÖ Writes the ``RECORD`` file, using the ``paths`` iterable passed in. Any existing ``RECORD`` file is silently overwritten. prefix is used to determine when to write absolute paths. uuRECORDu creating %su.pycu.pyou%durbN(u.pycu.pyo(R¨RR<tdirnamet startswithR»R@tinfoR"RtisdirR9tgetsizeRªR¦R«trelpathtwriterow( RtpathsR¥tdry_runtbasetbase_under_prefixt record_pathtwriterRt hash_valueR¸tfp((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pytwrite_installed_files¡s. ! c CsŸg}tjj|jƒ}|jdƒ}xn|jƒD]`\}}}tjj|ƒsptjj||ƒ}n||kr‚q7ntjj|ƒs°|j|dt t fƒq7tjj |ƒr7t tjj |ƒƒ}|r||kr|j|d||fƒq—|r—d|kr3|jddƒd}nd }t|dƒ�G} |j| jƒ|ƒ} | |kr‹|j|d|| fƒnWd QXq—q7q7W|S( u¨ Checks that the hashes and sizes of the files in ``RECORD`` are matched by the files themselves. Returns a (possibly empty) list of mismatches. Each entry in the mismatch list will be a tuple consisting of the path, 'exists', 'size' or 'hash' according to what didn't match (existence is checked first, then size, then hash), the expected value and the actual value. uRECORDuexistsusizeu=iiurbuhashN(R¨RRÂR»RÁtisabsR<R©RR$RtisfiletstrRÆRŒR"RªR¦R«( Rt mismatchesRËRÍRRÏR¸t actual_sizeR�R­t actual_hash((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pytcheck_installed_filesÄs.    ,cCsÅi}tjj|jdƒ}tjj|ƒrÁtj|dddƒ�}|jƒjƒ}WdQXx[|D]P}|jddƒ\}}|dkr°|j |gƒj |ƒqj|||‘su%s (%s)( R¬tstripRÃR@R‹R Rvt constraintsRRR<(R¤treqsRÜRÝRFtcons((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pytparse_requires_datazs&       csRg}y4tj|ddƒ�}ˆ|jƒƒ}WdQXWntk rMnX|S(u’Create a list of dependencies from a requires.txt file. *req_path*: the path to a setuptools-produced requires.txt file. uruutf-8N(RÚRªR«tIOError(treq_pathRïRÐ(Rñ(s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pytparse_requires_path•s u.egguEGG-INFOuPKG-INFORR1ulegacyu requires.txtu top_level.txtuEGG-INFO/PKG-INFOuutf8R0uEGG-INFO/requires.txtuEGG-INFO/top_level.txtuutf-8u .egg-infou,path must end with .egg-info or .egg, got %rurb(R"R9R¨RRÅR<Rt zipimportt zipimporterRtget_dataR£RòRtadd_requirementsR©RªR«R¬R§(RRtrequiresRôttl_pathttl_dataRct meta_pathR2RótzipfR0R¤R­((Rñs‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyRêwsT       !   cCsd|j|j|jfS(Nu!(RRVR(R((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyR�ÑscCsd|j|jfS(Nu%s %s(RRV(R((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyR®ÕscCs—g}tjj|jdƒ}tjj|ƒr“x`|jƒD]O\}}}||kr^q=ntjj|ƒs=|j|dttfƒq=q=Wn|S(u¨ Checks that the hashes and sizes of the files in ``RECORD`` are matched by the files themselves. Returns a (possibly empty) list of mismatches. Each entry in the mismatch list will be a tuple consisting of the path, 'exists', 'size' or 'hash' according to what didn't match (existence is checked first, then size, then hash), the expected value and the actual value. uinstalled-files.txtuexists(R¨RR<R©RÁRR$R(RRÕRÍRt_((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyRØØs  #c Cs2d„}d„}tjj|jdƒ}g}tjj|ƒr.tj|dddƒ�¹}x¯|D]§}|jƒ}tjjtjj|j|ƒƒ}tjj|ƒsÔtj d|ƒ|j d ƒrÔqdqÔntjj |ƒsd|j |||ƒ||ƒfƒqdqdWWd QX|j |d d fƒn|S( uµ Iterates over the ``installed-files.txt`` entries and returns a tuple ``(path, hash, size)`` for each line. :returns: a list of (path, hash, size) cSs@t|dƒ}z|jƒ}Wd|jƒXtj|ƒjƒS(Nurb(RªR«tcloseRžRŸt hexdigest(RR­tcontent((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyt_md5ós  cSstj|ƒjS(N(R¨tstattst_size(R((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyt_sizeûsuinstalled-files.txturRÙuutf-8uNon-existent file: %su.pycu.pyoN(u.pycu.pyo(R¨RR<R©RÚRªRítnormpathR@R‹R9RÅRR"(RRRRÍR[R­RÝRc((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyRÁës"    $ /c csâtjj|jdƒ}tjj|ƒrÞt}tj|dddƒ�‘}x‡|D]}|jƒ}|dkr|t}qRn|sRtjj tjj|j|ƒƒ}|j |jƒrÑ|rÆ|VqÎ|VqÑqRqRWWdQXndS(u  Iterates over the ``installed-files.txt`` entries and returns paths for each line if the path is pointing to a file located in the ``.egg-info`` directory or one of its subdirectories. :parameter absolute: If *absolute* is ``True``, each returned path is transformed into a local absolute path. Otherwise the raw value from ``installed-files.txt`` is returned. :type absolute: boolean :returns: iterator of paths uinstalled-files.txturRÙuutf-8u./N( R¨RR<R©R$RÚRªRíRRRÃ(RtabsoluteRÍtskipR­RÝRc((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyRås    $cCst|tƒo|j|jkS(N(RORçR(RR’((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyR“.sN(RRR R$R—RÞR"RRêR�R®RØRÁRRåR“RæR•(((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyRçYs  Z    &  tDependencyGraphcBsheZdZd„Zd„Zd d„Zd„Zd„Zdd„Z e d„Z d „Z d „Z RS( uù Represents a dependency graph between distributions. The dependency relationships are stored in an ``adjacency_list`` that maps distributions to a list of ``(other, label)`` tuples where ``other`` is a distribution and the edge is labeled with ``label`` (i.e. the version specifier, if such was provided). Also, for more efficient traversal, for every distribution ``x``, a list of predecessors is kept in ``reverse_list[x]``. An edge from distribution ``a`` to distribution ``b`` means that ``a`` depends on ``b``. If any missing dependencies are found, they are stored in ``missing``, which is a dictionary that maps distributions to a list of requirements that were not provided by any other distributions. cCsi|_i|_i|_dS(N(tadjacency_listt reverse_listR¶(R((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyRIs  cCsg|j| "%s" [label="%s"] u "%s" -> "%s" usubgraph disconnected { ulabel = "Disconnected" ubgcolor = red u"%s"u u} N(RàR titemsR±RR"R(RR­tskip_disconnectedt disconnectedRtadjsR’R((s‹/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/database.pytto_dot‚s&    %    cCs=g}i}x(|jjƒD]\}}|||t|jƒƒD])\}}|sZ|j|ƒ||=qZqZW|s‘PnxO|jƒD]A\}}g|D]$\}}||kr±||f^q±||sL         "4  ò�7ÿIÜ� 6