o
    ­—Žj­}  ã                   @  s$  d dl mZ 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Zd dl	m
Z
m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 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 dl m!Z!m"Z" d dl#m$Z$m%Z% d dl&m'Z' d dl(m)Z)m*Z*m+Z+m,Z, d dl-m.Z. d dl/m0Z0 d dl1m2Z2 d dl3m4Z4 d dl5m6Z6 d dl7m8Z8m9Z9 d dl:m;Z; d dl<m=Z= d dl>m?Z? d dl@mAZAmBZBmCZCmDZDmEZEmFZFmGZGmHZH d dlImJZJ d dlKmLZL d dlMmNZNmOZO d dlPmQZQ d d lRmSZS d d!lTmUZU e VeW¡ZXG d"d#„ d#ƒZYd1d'd(„ZZd2d/d0„Z[dS )3é    )ÚannotationsN)Ú
CollectionÚIterable)ÚValues)ÚPath)ÚAny)ÚMarker)ÚRequirement)ÚSpecifierSet)Úcanonicalize_name)ÚVersion)Úparse)ÚBuildBackendHookCaller)ÚBuildEnvironmentÚNoOpBuildEnvironment)ÚInstallationErrorÚPreviousBuildDirError)Ú
get_scheme)ÚBaseDistributionÚget_default_environmentÚget_directory_distributionÚget_wheel_distribution)ÚFilesystemWheel)Ú	DirectUrl)ÚLink)Úgenerate_metadata)Úgenerate_editable_metadata)Úload_pyproject_tomlÚmake_pyproject_path)ÚUninstallPathSet)Ú
deprecated)ÚHashes)Ú ConfiguredBuildBackendHookCallerÚask_path_existsÚ
backup_dirÚdisplay_pathÚhide_urlÚis_installable_dirÚredact_auth_from_requirementÚredact_auth_from_url)Úget_requirement)Úrunner_with_spinner_message)ÚTempDirectoryÚtempdir_kinds)Úunpack_file)Úrunning_under_virtualenv)Úvcsc                   @  sô  e Zd ZdZ				d‡ddddddœdˆdd„Zd‰dd„Zd‰d d!„Zd‰d"d#„ZedŠd%d&„ƒZ	e
jd‹d'd(„ƒZedŒd*d+„ƒZed‹d,d-„ƒZed‹d.d/„ƒZd�dŽd2d3„Zed‹d4d5„ƒZd�d�d9d:„ZdŠd;d<„Zd‘d@dA„Zd’dBdC„Zd’dDdE„Zd“dGdH„Zed‹dIdJ„ƒZed‹dKdL„ƒZed‰dMdN„ƒZed‰dOdP„ƒZed‰dQdR„ƒZd’dSdT„Zd”dVdW„Zd’dXdY„Zd•d[d\„Z ed–d^d_„ƒZ!d—dbdc„Z"d˜ddde„Z#d’dfdg„Z$		d™dšdidj„Z%d›dmdn„Z&d’dodp„Z'd’dqdr„Z(	d™dœdvdw„Z)d�d{d|„Z*džd}d~„Z+				6		6	dŸd d…d†„Z,dS )¡ÚInstallRequirementzÆ
    Represents something that may be installed later on, may have information
    about where to fetch the relevant requirement and also contains logic for
    installing the said requirement.
    FN© )Úhash_optionsÚconfig_settingsÚ
constraintÚextrasÚuser_suppliedÚreqúRequirement | NoneÚ
comes_fromústr | InstallRequirement | NoneÚeditableÚboolÚlinkúLink | NoneÚmarkersúMarker | NoneÚisolatedr3   údict[str, list[str]] | Noner4   ú!dict[str, str | list[str]] | Noner5   r6   úCollection[str]r7   ÚreturnÚNonec                C  sl  |d u st |tƒsJ |ƒ‚|| _|| _|	| _|| _d | _| jr2|s#J ‚|jr2tj	 
tj	 |j¡¡| _|d u r@|r@|jr@t|jƒ}| | _| _d | _d | _d | _| jr[| jjr[| jj| _|
ra|
| _n|rh|j| _ntƒ | _|d u ru|ru|j}|| _d | _d| _d | _d | _|rˆ|ni | _|| _d| _|| _|| _ t!ƒ | _"d | _#d | _$d | _%g | _&|  |  d | _'d| _(d | _)d S ©NF)*Ú
isinstancer	   r8   r:   r5   r<   Ú
source_dirÚis_fileÚosÚpathÚnormpathÚabspathÚ	file_pathÚurlr   r>   Úoriginal_linkÚcached_wheel_source_linkÚdownload_infoÚlocal_file_pathr6   ÚsetÚmarkerr@   Úsatisfied_byÚshould_reinstallÚ_temp_build_dirÚinstall_succeededr3   r4   Úpreparedr7   rB   r   Ú	build_envÚmetadata_directoryÚ_distributionÚpyproject_requiresÚrequirements_to_checkÚpep517_backendÚneeds_more_preparationÚ_archive_source)Úselfr8   r:   r<   r>   r@   rB   r3   r4   r5   r6   r7   r2   r2   úZ/var/www/kodo/Anonymous/send/lib/python3.10/site-packages/pip/_internal/req/req_install.pyÚ__init__D   sZ   



zInstallRequirement.__init__Ústrc                 C  s¸   | j rt| j ƒ}| jr|dt| jjƒ› �7 }n| jr!t| jjƒ}nd}| jd ur>| jjd ur5t| jjƒ}nd}|d|› �7 }| jrZt	| jt
ƒrK| j}n| j ¡ }|rZ|d|› d�7 }|S )Nz from z<InstallRequirement>z<memory>ú in z (from ú))r8   r(   r>   r)   rQ   rX   Úlocationr%   r:   rI   rh   Ú	from_path)re   Úsrk   r:   r2   r2   rf   Ú__str__´   s(   
€

zInstallRequirement.__str__c                 C  s"   d| j j› dt| ƒ› d| j›d�S )Nú<z	 object: z
 editable=ú>)Ú	__class__Ú__name__rh   r<   ©re   r2   r2   rf   Ú__repr__Ì   s   ÿÿÿzInstallRequirement.__repr__c                   s>   t | ƒ‰ tˆ ƒ}‡ fdd„t|ƒD ƒ}dj| jjd |¡d�S )z5An un-tested helper for getting state, for debugging.c                 3  s"   � | ]}|› d ˆ | ›�V  qdS )ú=Nr2   )Ú.0Úattr©Ú
attributesr2   rf   Ú	<genexpr>×   s   €  z2InstallRequirement.format_debug.<locals>.<genexpr>z<{name} object: {{{state}}}>z, )ÚnameÚstate)ÚvarsÚsortedÚformatrq   rr   Újoin)re   Únamesr|   r2   rx   rf   Úformat_debugÒ   s   þzInstallRequirement.format_debugú
str | Nonec                 C  s   | j d u rd S | j jS ©N)r8   r{   rs   r2   r2   rf   r{   Þ   s   
zInstallRequirement.namec              	   C  s†   | j sJ ‚| j�1 tdƒ}| j  |¡� d| j  ¡ v W  d   ƒ W  d   ƒ S 1 s,w   Y  W d   ƒ d S 1 s<w   Y  d S )Nz1Checking if build backend supports build_editableÚbuild_editable)rb   r]   r+   Úsubprocess_runnerÚ_supported_features)re   Úrunnerr2   r2   rf   Úsupports_pyproject_editableä   s   
ÿÿü"üz.InstallRequirement.supports_pyproject_editabler
   c                 C  s   | j d usJ ‚| j jS r„   )r8   Ú	specifierrs   r2   r2   rf   rŠ   î   s   zInstallRequirement.specifierc                 C  s
   | j duS )z7Whether this requirement was specified as a direct URL.N)rR   rs   r2   r2   rf   Ú	is_directó   s   
zInstallRequirement.is_directc                 C  s4   | j dusJ ‚| j j}t|ƒdkott|ƒƒjdv S )z„Return whether I am pinned to an exact version.

        For example, some-package==1.2 is pinned; some-package>1.2 is not.
        Né   >   ú==ú===)r8   rŠ   ÚlenÚnextÚiterÚoperator)re   Ú
specifiersr2   r2   rf   Ú	is_pinnedø   s   zInstallRequirement.is_pinnedÚextras_requestedúIterable[str] | Nonec                   s,   |sd}ˆ j d urt‡ fdd„|D ƒƒS dS )N)Ú c                 3  s    � | ]}ˆ j  d |i¡V  qdS )ÚextraN)r@   Úevaluate)rv   r˜   rs   r2   rf   rz     s   € 
ÿz3InstallRequirement.match_markers.<locals>.<genexpr>T)r@   Úany)re   r•   r2   rs   rf   Úmatch_markers  s   
ÿz InstallRequirement.match_markersc                 C  s
   t | jƒS )z©Return whether any known-good hashes are specified as options.

        These activate --require-hashes mode; hashes specified as part of a
        URL do not.

        )r=   r3   rs   r2   r2   rf   Úhas_hash_options  s   
z#InstallRequirement.has_hash_optionsTÚtrust_internetr!   c                 C  sd   | j  ¡ }|r| j}n| jr| jr| j}nd}|r.|jr.|jdus#J ‚| |jg ¡ 	|j¡ t
|ƒS )a§  Return a hash-comparer that considers my option- and URL-based
        hashes to be known-good.

        Hashes in URLs--ones embedded in the requirements file, not ones
        downloaded from an index server--are almost peers with ones from
        flags. They satisfy --require-hashes (whether it was implicitly or
        explicitly activated) but do not activate it. md5 and sha224 are not
        allowed in flags, which should nudge people toward good algos. We
        always OR all hashes together, even ones from URLs.

        :param trust_internet: Whether to trust URL-based (#md5=...) hashes
            downloaded from the internet, as by populate_link()

        N)r3   Úcopyr>   r‹   r7   rR   ÚhashÚ	hash_nameÚ
setdefaultÚappendr!   )re   r�   Úgood_hashesr>   r2   r2   rf   Úhashes  s   

zInstallRequirement.hashesc                 C  sP   | j du rdS t| j ƒ}| jr&t| jtƒr| j}n| j ¡ }|r&|d| 7 }|S )z8Format a nice indicator to show where this "comes from" Nz->)r8   rh   r:   rI   rl   )re   rm   r:   r2   r2   rf   rl   3  s   


zInstallRequirement.from_pathÚ	build_dirÚ
autodeleteÚparallel_buildsc                 C  sÀ   |d usJ ‚| j d ur| j jsJ ‚| j jS | jd u r&ttjdd�| _ | j jS t| jjƒ}|r8|› dt 	¡ j
› �}tj |¡sIt d|¡ t |¡ tj ||¡}|rTd nd}t||tjdd�jS )NT)ÚkindÚglobally_managedÚ_zCreating directory %sF)rM   Údeleter¨   r©   )rZ   rM   r8   r,   r-   Ú	REQ_BUILDr   r{   ÚuuidÚuuid4ÚhexrL   ÚexistsÚloggerÚdebugÚmakedirsr€   )re   r¥   r¦   r§   Údir_nameÚactual_build_dirÚ
delete_argr2   r2   rf   Úensure_build_locationB  s2   

ÿ
üûz(InstallRequirement.ensure_build_locationc                 C  sn   | j du sJ ‚| jdusJ ‚| jdusJ ‚tt| jd ƒtƒr"d}nd}td | jd || jd g¡ƒ| _ dS )z*Set requirement after generating metadata.Nr   r�   rŽ   r—   ÚName)r8   ÚmetadatarJ   rI   Úparse_versionr   r*   r€   )re   Úopr2   r2   rf   Ú_set_requirementm  s   ýÿ
ÿz#InstallRequirement._set_requirementc                 C  sR   | j d usJ ‚t| jd ƒ}t| j jƒ|krd S t d| j|| j¡ t|ƒ| _ d S )Nr¸   zeGenerating metadata for package %s produced metadata for project name %s. Fix your #egg=%s fragments.)r8   r   r¹   r{   r±   Úwarningr*   )re   Úmetadata_namer2   r2   rf   Úwarn_on_mismatching_nameƒ  s   úz+InstallRequirement.warn_on_mismatching_nameÚuse_user_sitec                 C  s®   | j du rdS tƒ  | j j¡}|sdS | j jj|jdd�}|sGd| _|rB|jr,d| _	dS t
ƒ r>|jr@td|j› d|j› �ƒ‚dS dS d| _	dS | jrRd| _	d| _dS || _dS )z¬Find an installed distribution that satisfies or conflicts
        with this requirement, and set self.satisfied_by or
        self.should_reinstall appropriately.
        NT)ÚprereleaseszNWill not install to the user site because it will lack sys.path precedence to ri   )r8   r   Úget_distributionr{   rŠ   ÚcontainsÚversionrX   Úin_usersiterY   r/   Úin_site_packagesr   Úraw_namerk   r<   )re   rÀ   Úexisting_distÚversion_compatibler2   r2   rf   Úcheck_if_exists•  s8   
þ
ÿþÿÿ


z"InstallRequirement.check_if_existsc                 C  s   | j sdS | j jS rH   )r>   Úis_wheelrs   r2   r2   rf   rË   »  s   zInstallRequirement.is_wheelc                 C  s
   | j d uS r„   )rS   rs   r2   r2   rf   Úis_wheel_from_cacheÁ  s   
z&InstallRequirement.is_wheel_from_cachec                 C  s2   | j s
J d| › �ƒ‚tj | j | jr| jjpd¡S )NúNo source dir for r—   )rJ   rL   rM   r€   r>   Úsubdirectory_fragmentrs   r2   r2   rf   Úunpacked_source_directoryÈ  s   ÿz,InstallRequirement.unpacked_source_directoryc                 C  s(   | j s
J d| › �ƒ‚tj | jd¡}|S )NrÍ   zsetup.py)rJ   rL   rM   r€   rÏ   )re   Úsetup_pyr2   r2   rf   Úsetup_py_pathÏ  s   z InstallRequirement.setup_py_pathc                 C  s   | j s
J d| › �ƒ‚t| jƒS )NrÍ   )rJ   r   rÏ   rs   r2   r2   rf   Úpyproject_toml_pathÖ  s   
z&InstallRequirement.pyproject_toml_pathc                 C  sD   t | j| jt| ƒƒ}|sJ ‚|\}}}}|| _|| _|| _|| _dS )z«Load the pyproject.toml file.

        After calling this routine, all of the attributes related to PEP 517
        processing for this requirement have been set.
        N)r   rÒ   rÑ   rh   ra   r`   Ú_pep517_backend_specÚ_pep517_backend_path)re   Úpyproject_toml_dataÚrequiresÚbackendÚcheckÚbackend_pathr2   r2   rf   r   Û  s   ÿ
z&InstallRequirement.load_pyproject_tomlÚpython_executablec                 C  s   t | | j| j| j|d�| _dS )zÔSet up the build backend hook caller.

        This is done separately after pyproject.toml loading as the backend
        need to be called with the build environment's Python executable,
        which can vary.)rÙ   rÚ   N)r"   rÏ   rÓ   rÔ   rb   )re   rÚ   r2   r2   rf   Úconfigure_backendë  s   ûz$InstallRequirement.configure_backendc                 C  s$   | j r| jstd| › d�ƒ‚dS dS )z¡Check that an editable requirement if valid for use with PEP 517/518.

        This verifies that an editable has a build backend that supports PEP 660.
        zProject z¢ uses a build backend that is missing the 'build_editable' hook, so it cannot be installed in editable mode. Consider using a build backend that supports PEP 660.N)r<   r‰   r   rs   r2   r2   rf   Úeditable_sanity_checkù  s
   
ÿÿz(InstallRequirement.editable_sanity_checkÚallow_editablesc                 C  s’   | j s
J d| › �ƒ‚| jpd| j› �}| jdusJ ‚| jr-|r-| jr-t| j| j|d�| _n
t	| j| j|d�| _| js?|  
¡  n|  ¡  |  ¡  dS )z¿Ensure that project metadata is available.

        Under PEP 517 and PEP 660, call the backend hook to prepare the metadata.
        Under legacy processing, call setup.py egg-info.
        rÍ   zfrom N)r]   r×   Údetails)rJ   r{   r>   rb   r<   r‰   r   r]   r^   r   r¼   r¿   Úassert_source_matches_version)re   rÝ   rÞ   r2   r2   rf   Úprepare_metadata  s$   
ýý
z#InstallRequirement.prepare_metadatar   c                 C  s   t | dƒs|  ¡ j| _| jS )NÚ	_metadata)ÚhasattrÚget_distr¹   rá   rs   r2   r2   rf   r¹   %  s   
zInstallRequirement.metadataÚdistributionr   c                 C  s
   || _ d S r„   )r_   )re   rä   r2   r2   rf   Úset_dist,  s   
zInstallRequirement.set_distc                 C  sb   | j d ur| j S | jrt| jƒS | jr)| jr)| jd usJ ‚tt| jƒt| jj	ƒƒS t
d| › d�ƒ‚)NzInstallRequirement zC has no metadata directory and no wheel: can't make a distribution.)r_   r^   r   rU   rË   r8   r   r   r   r{   ÚAssertionErrorrs   r2   r2   rf   rã   /  s   


þ
ÿzInstallRequirement.get_distc                 C  sd   | j s
J d| › �ƒ‚| jd }| jr%| jjr%|| jjvr%t d| |¡ d S t dt| j ƒ|| ¡ d S )NrÍ   rÄ   z'Requested %s, but installing version %sz;Source in %s has version %s, which satisfies requirement %s)rJ   r¹   r8   rŠ   r±   r½   r²   r%   )re   rÄ   r2   r2   rf   rß   ?  s   
ýüz0InstallRequirement.assert_source_matches_versionÚ
parent_dirc                 C  s$   | j du r| j|||d�| _ dS dS )aA  Ensure that a source_dir is set.

        This will create a temporary build dir if the name of the requirement
        isn't known yet.

        :param parent_dir: The ideal pip parent_dir for the source_dir.
            Generally src_dir for editables and build_dir for sdists.
        :return: self.source_dir
        N)r¦   r§   )rJ   r·   )re   rç   r¦   r§   r2   r2   rf   Úensure_has_source_dirQ  s   
ýÿz(InstallRequirement.ensure_has_source_dirÚarchive_sourcer   c                 C  s   | j d u sJ ‚|| _ d S r„   )rd   )re   ré   r2   r2   rf   Úneeds_unpacked_archiveg  s   
z)InstallRequirement.needs_unpacked_archivec                 C  sT   | j dusJ ‚| jdurtt| jƒ| j ƒ dS t| j ƒr(td| › d| j › d�ƒ‚dS )z6Ensure the source directory has not yet been built in.Nz%pip can't proceed with requirements 'z)' due to a pre-existing build directory (zœ). This is likely due to a previous installation that failed . pip is being responsible and not assuming it can delete this. Please delete it and try again.)rJ   rd   r.   rh   r'   r   rs   r2   r2   rf   Úensure_pristine_source_checkoutk  s   

ÿÿüz2InstallRequirement.ensure_pristine_source_checkoutc                 C  s‚   | j st d| j¡ d S | jsJ ‚| jsJ ‚| j jdkrd S t | j j¡}|s0J d| j j› �ƒ‚t	| j jƒ}|j
| j|dd� d S )Nz>Cannot update repository at %s; repository location is unknownÚfilezUnsupported VCS URL r   )rQ   Ú	verbosity)r>   r±   r²   rJ   r<   Úschemer0   Úget_backend_for_schemerQ   r&   Úobtain)re   Úvcs_backendÚ
hidden_urlr2   r2   rf   Úupdate_editable}  s   þ

z"InstallRequirement.update_editableÚauto_confirmÚverboseúUninstallPathSet | Nonec                 C  sV   | j sJ ‚tƒ  | j j¡}|st d| j¡ dS t d|¡ t |¡}| 	||¡ |S )a¥  
        Uninstall the distribution currently satisfying this requirement.

        Prompts before removing or modifying files unless
        ``auto_confirm`` is True.

        Refuses to delete or modify files outside of ``sys.prefix`` -
        thus uninstallation within a virtual environment can only
        modify that virtual environment, even if the virtualenv is
        linked to global site-packages.

        z#Skipping %s as it is not installed.NzFound existing installation: %s)
r8   r   rÂ   r{   r±   r½   Úinfor   Ú	from_distÚremove)re   rô   rõ   ÚdistÚuninstalled_pathsetr2   r2   rf   Ú	uninstall‘  s   

zInstallRequirement.uninstallrM   Ú	parentdirÚrootdirc                 C  s@   ddd„}| j d usJ ‚tj ||¡}|||ƒ}| j jd | S )	Nr{   rh   ÚprefixrF   c                 S  sN   |   |tjj ¡sJ d| ›d|›�ƒ‚| t|ƒd d … } |  tjjd¡} | S )Nzname z doesn't start with prefix rŒ   ú/)Ú
startswithrL   rM   Úsepr�   Úreplace)r{   rÿ   r2   r2   rf   Ú_clean_zip_name¬  s   
ÿþz=InstallRequirement._get_archive_name.<locals>._clean_zip_namer   )r{   rh   rÿ   rh   rF   rh   )r8   rL   rM   r€   r{   )re   rM   rý   rþ   r  r{   r2   r2   rf   Ú_get_archive_name«  s
   

z$InstallRequirement._get_archive_namec                 C  sÄ  | j sJ ‚|du rdS d}d | j| jd ¡}tj ||¡}tj |¡rktdt	|ƒ› d�dƒ}|dkr6d	}n5|d
krHt
 dt	|ƒ¡ t |¡ n#|dkrbt|ƒ}t
 dt	|ƒt	|ƒ¡ t ||¡ n	|dkrkt d¡ |sodS tj|d
tjdd�}|�U tj tj | j¡¡}t |¡D ]<\}	}
}|
D ]}| j||	|d�}t |d ¡}d|_| |d¡ q“|D ]}| j||	|d�}tj |	|¡}| ||¡ q°qŒW d  ƒ n1 sÓw   Y  t
 dt	|ƒ¡ dS )z}Saves archive to provided build_dir.

        Used for saving downloaded VCS requirements as part of `pip download`.
        NTz	{}-{}.ziprÄ   z	The file z- exists. (i)gnore, (w)ipe, (b)ackup, (a)bort )ÚiÚwÚbÚar  Fr  zDeleting %sr  zBacking up %s to %sr	  éÿÿÿÿ)Ú
allowZip64)rý   rþ   r   i  ír—   zSaved %s)rJ   r   r{   r¹   rL   rM   r€   r°   r#   r%   r±   r½   rù   r$   ÚshutilÚmoveÚsysÚexitÚzipfileÚZipFileÚZIP_DEFLATEDÚnormcaserO   rÏ   Úwalkr  ÚZipInfoÚexternal_attrÚwritestrÚwriter÷   )re   r¥   Úcreate_archiveÚarchive_nameÚarchive_pathÚresponseÚ	dest_fileÚ
zip_outputÚdirÚdirpathÚdirnamesÚ	filenamesÚdirnameÚdir_arcnameÚzipdirÚfilenameÚfile_arcnamer2   r2   rf   Úarchive¹  st   
ýý
üýýùöþzInstallRequirement.archiveÚrootÚhomerÿ   Úwarn_script_locationÚ	pycompileÚscript_executablec           
      C  s†   ddl m} | jd usJ ‚t| jj|||| j|d�}	| jsJ ‚| js$J ‚|| jj| j|	t| jƒ||| j	r7| j
nd | j|d�	 d| _d S )Nr   )Úinstall_wheel)Úuserr*  r)  rB   rÿ   )rî   Úreq_descriptionr,  r+  Ú
direct_urlÚ	requestedr-  T)Ú&pip._internal.operations.install.wheelr.  r8   r   r{   rB   rË   rU   rh   r‹   rT   r7   r[   )
re   r)  r*  rÿ   r+  rÀ   r,  r-  r.  rî   r2   r2   rf   Úinstallü  s0   ú
	
÷
zInstallRequirement.install)FNNF)r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   r=   r3   rC   r4   rD   r5   r=   r6   rE   r7   r=   rF   rG   )rF   rh   )rF   rƒ   )rF   r=   )rF   r
   r„   )r•   r–   rF   r=   )T)r�   r=   rF   r!   )r¥   rh   r¦   r=   r§   r=   rF   rh   )rF   rG   )rÀ   r=   rF   rG   )rÚ   rh   rF   rG   )rÝ   r=   rF   rG   )rF   r   )rä   r   rF   rG   )rF   r   )FF)rç   rh   r¦   r=   r§   r=   rF   rG   )ré   r   rF   rG   )rô   r=   rõ   r=   rF   rö   )rM   rh   rý   rh   rþ   rh   rF   rh   )r¥   rƒ   rF   rG   )NNNTFTN)r)  rƒ   r*  rƒ   rÿ   rƒ   r+  r=   rÀ   r=   r,  r=   r-  rƒ   rF   rG   )-rr   Ú
__module__Ú__qualname__Ú__doc__rg   rn   rt   r‚   Úpropertyr{   Ú	functoolsÚcached_propertyr‰   rŠ   r‹   r”   r›   rœ   r¤   rl   r·   r¼   r¿   rÊ   rË   rÌ   rÏ   rÑ   rÒ   r   rÛ   rÜ   rà   r¹   rå   rã   rß   rè   rê   rë   ró   rü   r  r(  r4  r2   r2   r2   rf   r1   =   s�    
ù	ó
p

			


+

&






ü


ÿ

Eør1   r8   rF   rh   c                 C  s>   d}| j sd}n| jrd}n| jrd}|rtddd dd� |S )	Nr—   z3Unnamed requirements are not allowed as constraintsz4Editable requirements are not allowed as constraintszConstraints cannot have extrasa  Constraints are only allowed to take the form of a package name and a version specifier. Other forms were originally permitted as an accident of the implementation, but were undocumented. The new implementation of the resolver no longer supports these forms.z+replacing the constraint with a requirementi   )ÚreasonÚreplacementÚgone_inÚissue)r{   r<   r6   r    )r8   Úproblemr2   r2   rf   Úcheck_invalid_constraint_type(  s   õr@  Úoptionsr   Úreqsúlist[InstallRequirement]Úoptionr=   c                 C  s0   t | |d ƒrdS |D ]}t ||d ƒr dS q
dS )NTF)Úgetattr)rA  rB  rD  r8   r2   r2   rf   Ú_has_optionD  s   ÿrF  )r8   r1   rF   rh   )rA  r   rB  rC  rD  rh   rF   r=   )\Ú
__future__r   r9  ÚloggingrL   r  r  r­   r  Úcollections.abcr   r   Úoptparser   Úpathlibr   Útypingr   Úpip._vendor.packaging.markersr   Ú"pip._vendor.packaging.requirementsr	   Ú pip._vendor.packaging.specifiersr
   Úpip._vendor.packaging.utilsr   Úpip._vendor.packaging.versionr   r   rº   Úpip._vendor.pyproject_hooksr   Úpip._internal.build_envr   r   Úpip._internal.exceptionsr   r   Úpip._internal.locationsr   Úpip._internal.metadatar   r   r   r   Úpip._internal.metadata.baser   Úpip._internal.models.direct_urlr   Úpip._internal.models.linkr   Ú'pip._internal.operations.build.metadatar   Ú0pip._internal.operations.build.metadata_editabler   Úpip._internal.pyprojectr   r   Úpip._internal.req.req_uninstallr   Úpip._internal.utils.deprecationr    Úpip._internal.utils.hashesr!   Úpip._internal.utils.miscr"   r#   r$   r%   r&   r'   r(   r)   Úpip._internal.utils.packagingr*   Úpip._internal.utils.subprocessr+   Úpip._internal.utils.temp_dirr,   r-   Úpip._internal.utils.unpackingr.   Úpip._internal.utils.virtualenvr/   Úpip._internal.vcsr0   Ú	getLoggerrr   r±   r1   r@  rF  r2   r2   r2   rf   Ú<module>   s`    (

     
p