Viewing File: /opt/alt/python35/lib/python3.5/site-packages/pip/_internal/req/__pycache__/req_set.cpython-35.pyc



t_@sddlmZddlZddlmZddlmZddlmZddl	m
Z
ddlmZddl
mZerdd	lmZmZmZmZmZdd
lmZejeZGdddeZdS)
)absolute_importN)OrderedDict)canonicalize_name)InstallationError)Wheel)compatibility_tags)MYPY_CHECK_RUNNING)DictIterableListOptionalTuple)InstallRequirementc@seZdZdddZddZddZdd	Zd
dZddd
dZddZ	ddZ
eddZdS)RequirementSetTcCs"t|_||_g|_dS)z!Create a RequirementSet.
        N)rrequirementscheck_supported_wheelsunnamed_requirements)selfrr/builddir/build/BUILDROOT/alt-python35-pip-20.2.4-1.el7.x86_64/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/req/req_set.py__init__s	zRequirementSet.__init__cCsHtdd|jjDddd}djdd|DS)Ncss|]}|js|VqdS)N)
comes_from).0reqrrr	<genexpr>$sz)RequirementSet.__str__.<locals>.<genexpr>keycSs
t|jS)N)rname)rrrr<lambda>%sz(RequirementSet.__str__.<locals>.<lambda> css|]}t|jVqdS)N)strr)rrrrrr's)sortedrvaluesjoin)rrrrr__str__!szRequirementSet.__str__c	Cset|jjddd}d}|jd|jjdt|ddjd	d
|DS)NrcSs
t|jS)N)rr)rrrrr-sz)RequirementSet.__repr__.<locals>.<lambda>z4<{classname} object; {count} requirement(s): {reqs}>	classnamecountreqsz, css|]}t|jVqdS)N)rr)rrrrrr4sz*RequirementSet.__repr__.<locals>.<genexpr>)r rr!format	__class____name__lenr")rr
format_stringrrr__repr__)s	zRequirementSet.__repr__cCs$|jst|jj|dS)N)rAssertionErrorrappend)rinstall_reqrrradd_unnamed_requirement7sz&RequirementSet.add_unnamed_requirementcCs/|jstt|j}||j|<dS)N)rr-rr)rr/project_namerrradd_named_requirement<sz$RequirementSet.add_named_requirementNc	
Cse|j|s2tjd|j|jgdfS|jr|jjrt|jj}t	j
}|jr|j|rt
dj|j|js|dkstd|js|j||gdfSy|j|j}Wntk
rd}YnX|dkoO|oO|joO|j|jkoO|jj|jjk}|rvt
dj|||j|s|j||g|fS|js|jrg|fS|jo|jo|jj|jjk}|rt
dj|jd|_|jrd|_ttt|jt|jB|_tjd	||j|g|fS)
a&Add install_req as a requirement to install.

        :param parent_req_name: The name of the requirement that needed this
            added. The name is used because when multiple unnamed requirements
            resolve to the same name, we could otherwise end up with dependency
            links that point outside the Requirements set. parent_req must
            already be added. Note that None implies that this is a user
            supplied requirement, vs an inferred one.
        :param extras_requested: an iterable of extras used to evaluate the
            environment markers.
        :return: Additional requirements to scan. That is either [] if
            the requirement is not applicable, or [install_req] if the
            requirement is applicable and has just been added.
        z6Ignoring %s: markers '%s' don't match your environmentNz-{} is not a supported wheel on this platform.z+a user supplied req shouldn't have a parentz7Double requirement given: {} (already in {}, name={!r})zhCould not satisfy constraints for '{}': installation from path or url cannot be constrained to a versionFTzSetting %s extras to: %s)
match_markersloggerinformarkerslinkis_wheelrfilenamer
get_supportedr	supportedrr'
user_suppliedr-r0get_requirementKeyError
constraintextrasr	specifierr2pathtupler setdebug)	rr/parent_req_nameextras_requestedwheeltagsexisting_reqhas_conflicting_requirementdoes_not_satisfy_constraintrrradd_requirementCsh
		






					%
zRequirementSet.add_requirementcCs*t|}||jko)|j|jS)N)rrr?)rrr1rrrhas_requirementszRequirementSet.has_requirementcCsBt|}||jkr&|j|StdjtdS)Nz!No project with the name {name!r})rrr>r'locals)rrr1rrrr=szRequirementSet.get_requirementcCs|jt|jjS)N)rlistrr!)rrrrall_requirementsszRequirementSet.all_requirements)
r)
__module____qualname__rr#r,r0r2rMrNr=propertyrQrrrrrs

o		r)
__future__rloggingcollectionsrZpip._vendor.packaging.utilsrpip._internal.exceptionsrpip._internal.models.wheelrZpip._internal.utilsrpip._internal.utils.typingrtypingr	r
rrr
Zpip._internal.req.req_installr	getLoggerr)r4objectrrrrr<module>s(
Back to Directory File Manager