관리-도구
편집 파일: providers.cpython-39.pyc
a �)g�\ � @ s` d Z ddlmZmZmZ eZddlZddlZ e j rVddlmZ ddl mZ ddlmZ ddlmZ ddlmZmZ dd lmZmZ dd lmZ ddlmZmZ zddlmZ dd lm Z! W n$ e"y� G dd� d�ZdZ!Y n0 ed�Z#ed�Z$e�%ee!��Z&G dd� de�Z'G dd� de'�Z(G dd� de'�Z)G dd� de)�Z*G dd� de)�Z+dd� Z,e,� Z-dS )z Requirement provider interfaces.� )�absolute_import�division�print_functionN)�ConcreteArtifactsManager)�MultiGalaxyAPIProxy)� GalaxyAPI)�get_signature_from_source)� Candidate�Requirement)�is_pre_release�meets_requirements)�string_types)�SemanticVersion�LooseVersion)�AbstractProvider)�__version__c @ s e Zd ZdS )r N)�__name__� __module__�__qualname__� r r �R/usr/lib/python3.9/site-packages/ansible/galaxy/dependency_resolution/providers.pyr # s r z0.0.0z0.5.3z0.9.0c @ sZ e Zd ZdZddd�Zdd� Zd d � Zdd� Zd d� Zdd� Z dd� Z dd� Zdd� ZdS )� CollectionDependencyProviderBasez<Delegate providing a requirement interface for the resolver.NTFc C sZ || _ tjtj|d�| _tdd� |p&dD ��| _t|p8d�| _|| _ || _ || _|| _dS )aU Initialize helper attributes. :param api: An instance of the multiple Galaxy APIs wrapper. :param concrete_artifacts_manager: An instance of the caching \ concrete artifacts manager. :param with_deps: A flag specifying whether the resolver \ should attempt to pull-in the deps of the \ requested requirements. On by default. :param with_pre_releases: A flag specifying whether the \ resolver should skip pre-releases. \ Off by default. :param upgrade: A flag specifying whether the resolver should \ skip matching versions that are not upgrades. \ Off by default. :param include_signatures: A flag to determine whether to retrieve \ signatures from the Galaxy APIs and \ include signatures in matching Candidates. \ On by default. )Zart_mgrc s sB | ]:}|j s"|jd kr|j�d�st|j|j|j|jd�V qdS )�*)�<�>�!=N)�is_concrete_artifact�ver� startswithr �fqcn�src�type)�.0Zreqr r r � <genexpr>Z s �z<CollectionDependencyProviderBase.__init__.<locals>.<genexpr>r N) � _api_proxy� functools�partialr Zfrom_requirement_dict�_make_req_from_dict�set�_pinned_candidate_requests�_preferred_candidates� _with_deps�_with_pre_releases�_upgrade�_include_signatures) �selfZapisZconcrete_artifacts_managerZuser_requirementsZpreferred_candidatesZ with_depsZwith_pre_releasesZupgradeZinclude_signaturesr r r �__init__2 s #�� z)CollectionDependencyProviderBase.__init__c C s>