OwlCyberSecurity - MANAGER
Edit File: prepare.pyc
� �Rec�����������@���s��d��Z��d�d�l�Z�d�d�l�Z�d�d�l�Z�d�d�l�Z�d�d�l�m�Z�d�d�l�m�Z�d�d�l �m �Z �d�d�l�m�Z�m �Z �m�Z�m�Z�m�Z�m�Z�m�Z�d�d�l�m�Z�d�d�l�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 �m!�Z!�d�d �l"�m#�Z#�d�d�l$�m%�Z%�e!�rtd�d�l&�m'�Z'�m(�Z(�m)�Z)�m*�Z*�d�d�l+�m,�Z,�d�d�l�m-�Z-�d�d�l.�m/�Z/�d�d�l0�m1�Z1�d�d�l2�m3�Z3�d�d�l4�m5�Z5�d�d�l6�m7�Z7�d�d�l�m8�Z8�e�re,�d�i�e'�e9�e(�e9�g�e(�e9�f�d�6e:�d�6d�e;��Z<�qte,�d�i�e'�e9�e9�g�d�f�d�6e'�e9�e(�e9�g�e(�e9�f�d�6e:�d�6e:�d�6d�e;��Z<�n��e�j>�e?���Z@�d����ZA�d����ZB�d �eC�f�d!�������YZD�d�d�d"���ZE�d#����ZF�d$����ZG�d�d�d%���ZH�d�d�d&���ZI�d'����ZJ�d(����ZK�d)�eC�f�d*�������YZL�d�S(+���s)���Prepares a distribution for installation i����N(���t���PY2(���t)���make_distribution_for_install_requirement(���t���InstalledDistribution(���t���DirectoryUrlHashUnsupportedt���HashMismatcht���HashUnpinnedt���InstallationErrort���NetworkConnectionErrort���PreviousBuildDirErrort���VcsHashUnsupported(���t���copy2_fixed(���t ���MissingHashes(���t ���indent_log(���t���display_patht���hide_urlt���path_to_displayt���rmtree(���t ���TempDirectory(���t���MYPY_CHECK_RUNNING(���t���unpack_file(���t���vcs(���t���Callablet���Listt���Optionalt���Tuple(���t ���TypedDict(���t���AbstractDistribution(���t ���PackageFinder(���t���Link(���t ���Downloader(���t���InstallRequirement(���t���RequirementTracker(���t���Hashest���CopytreeKwargst���ignoret���symlinkst���totalt ���copy_functiont���ignore_dangling_symlinksc���������C���s6���t��|����}�|�j�|������|�j�|�|���Wd�QX|�S(���s-���Prepare a distribution for installation. N(���R���t���trackt���prepare_distribution_metadata(���t���reqt���req_trackert���findert���build_isolationt ���abstract_dist(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pyt���_get_prepared_distributionP���s���� c���������C���sD���t��j�|��j���}�|�d��k �s$�t���|�j�|�d�t�|��j����d��S(���Nt���url(���R���t���get_backend_for_schemet���schemet���Nonet���AssertionErrort���unpackR���R/���(���t���linkt���locationt���vcs_backend(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pyt���unpack_vcs_link_���s����t���Filec�����������B���s���e��Z�d�����Z�RS(���c���������C���s���|�|��_��|�|��_�d��S(���N(���t���patht���content_type(���t���selfR:���R;���(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pyt���__init__g���s���� (���t���__name__t ���__module__R=���(����(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pyR9���f���s���c���������C���s����t��d�d�d�t���}�d��}�|�r6�t�|��|�|���}�n��|�rX�|�}�t�j�|���d�}�n�t�|��|�|�j�|���\�}�}�t�|�|���S(���Nt���kindR4���t���globally_managedi����( ���R���t���TrueR2���t���_check_download_dirt ���mimetypest ���guess_typet���_download_http_urlR:���R9���(���R5���t ���downloadert���download_dirt���hashest���temp_dirt���already_downloaded_patht ���from_pathR;���(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pyt���get_http_urlm���s����c���������C���sV���y�t��|��|���Wn>�t�j�k �rQ�}�t�j�d�t�|���t�|����t�|�����n�Xd�S(���s����Copying special files is not supported, but as a convenience to users we skip errors copying them. This supports tools that may create e.g. socket files in the project source directory. s>���Ignoring special file error '%s' encountered copying %s to %s.N(���R ���t���shutilt���SpecialFileErrort���loggert���warningt���strR���(���t���srct���destt���e(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pyt���_copy2_ignoring_special_files����s���� c������������s����t��j�j�|���}�t��j�j�|�����t��j�j�|������������f�d����}�t�d�|�d�t���}�t�ss�t�|�d�<n��t �j ����|�|���d��S(���Nc������������sQ���g��}�|�����k�r%�|�d�d�g�7}�n��t��j�j�|������k�rM�|���g�7}�n��|�S(���Ns���.toxs���.nox(���t���osR:���t���abspath(���t���dt���namest���skipped(���t���sourcet���target_basenamet���target_dirname(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pyR"�������s����R"���R#���R%���(���RW���R:���RX���t���basenamet���dirnamet���dictRB���R����RV���RN���t���copytree(���R\���t���targett���target_abspathR"���t���kwargs(����(���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/_internal/operations/prepare.pyt���_copy_source_tree����s���� c���������C���so���d�}�|�r!�t�|��|�|���}�n��|�r0�|�}�n �|��j�}�|�rO�|�j�|���n��t�j�|���d�}�t�|�|���S(���s,���Get file and optionally check its hash. i����N(���R2���RC���t ���file_patht���check_against_pathRD���RE���R9���(���R5���RH���RI���RK���RL���R;���(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pyt���get_file_url����s���� c���������C���s����|��j��r�t�|��|���d�S|��j����rY�t�j�j�|���rE�t�|���n��t�|��j �|���d�S|��j �rz�t�|��|�d�|��}�n�t�|��|�|�d�|��}�|��j �s��t�|�j�|�|�j���n��|�S(���s_��Unpack link into location, downloading if required. :param hashes: A Hashes object, one of whose embedded hashes must match, or HashMismatch will be raised. If the Hashes is empty, no matches are required, and unhashable types of requirements (like VCS ones, which would ordinarily raise HashUnsupported) are allowed. RI���N(���t���is_vcsR8���R2���t���is_existing_dirRW���R:���t���isdirR���Rf���Rg���t���is_fileRi���RM���t���is_wheelR���R;���(���R5���R6���RG���RH���RI���t���file(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pyt ���unpack_url����s$���� c���������C���s����|�|����}�t��j�j�|�|�j���}�t�|�d����(�}�x�|�j�D]�}�|�j�|���q@�WWd�QX|�rs�|�j�|���n��|�|�j�j �j �d�d���f�S(���s6���Download link url into temp_dir using provided sessiont���wbNs���content-typet����(���RW���R:���t���joint���filenamet���opent���chunkst���writeRh���t���responset���headerst���get(���R5���RG���RJ���RI���t���downloadRg���t���content_filet���chunk(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pyRF�����s����c���������C���s����t��j�j�|�|��j���}�t��j�j�|���s.�d�St�j�d�|���|�r��y�|�j�|���Wq��t �k �r��t�j �d�|���t��j�|���d�SXn��|�S(���s���� Check download_dir for previously downloaded file with correct hash If a correct file is found return its path else None s���File was already downloaded %ss;���Previously-downloaded file %s has bad hash. Re-downloading.N(���RW���R:���Rs���Rt���t���existsR2���RP���t���infoRh���R���RQ���t���unlink(���R5���RH���RI���t ���download_path(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pyRC���#��s���� t���RequirementPreparerc�����������B���s_���e��Z�d��Z�d����Z�e�d������Z�d����Z�d����Z�d����Z�e �d���Z �d����Z�d����Z�RS( ���s���Prepares a Requirement c���������C���sq���t��t�|����j����|�|��_�|�|��_�|�|��_�|�|��_�|�|��_�|�|��_�|�|��_ �|�|��_ �| �|��_�| �|��_�d��S(���N( ���t���superR����R=���t���src_dirt ���build_dirR*���RG���R+���RH���t���wheel_download_dirR,���t���require_hashest ���use_user_site(���R<���R����RH���R����R����R,���R*���RG���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/_internal/operations/prepare.pyR=���A��s���� c���������C���sO���|��j��s �t�St�j�j�|��j����r&�t�St�j�d���t�d�j �|��j��������d��S(���Ns!���Could not find download directorys0���Could not find or access download directory '{}'( ���RH���t���FalseRW���R:���R~���RB���RP���t���criticalR���t���format(���R<���(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pyt���_download_should_saven��s���� c���������C���sN���|�j��j�r1�|�j��j�}�t�j�d�t�|�����n�t�j�d�|�j�pF�|���d�S(���s���Log the way the link prepared.s ���Processing %ss ���Collecting %sN(���R5���Rm���Rg���RP���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/_internal/operations/prepare.pyt���_log_preparing_link|��s����c���������C���s����|�j��j�r�d�S|�j�d�k�s%�t���|�j�|��j�d�t�d�|��t�j �j �t�j �j�|�j�d�����r��t�d�j �|�|�j�������n��d�S(���s1���Ensure source_dir of a linked InstallRequirement.Nt ���autodeletet���parallel_buildss���setup.pys����pip can't proceed with requirements '{}' due to apre-existing build directory ({}). 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.(���R5���Rn���t ���source_dirR2���R3���t���ensure_has_source_dirR����RB���RW���R:���R~���Rs���R���R����(���R<���R)���RH���R����(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pyt���_ensure_link_req_src_dir���s���� $c���������C���s����|��j��s�|�j�d�t���S|�j�j�r1�t������n��|�j�j����rL�t������n��|�j�d��k�rq�|�j �rq�t������n��|�j�d�t���p��t ����S(���Nt���trust_internet(���R����RI���RB���R5���Rj���R ���Rk���R���t ���original_linkR2���t ���is_pinnedR���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/_internal/operations/prepare.pyt���_get_linked_req_hashes���s���� c��� ������C���s���|�j��s�t���|�j��}�|��j�|���|�j�rC�|��j�rC�|��j�}�n �|��j�}�t�����\|��j�|�|�|���y.�t�|�|�j �|��j �|�d�|��j�|����}�Wn.�t�k �r��}�t �d�j�|�|�|�������n�X|�r��|�j�|�_�n��t�|�|��j�|��j�|��j���}�|�r�|�j����rt�j�d���q�|�r�t�j�j�|�|�j���}�t�j�j�|���s�t�j�|�j�|���t�|���} �t�j�d�| ���q�q�n��|��j�r�|�j �r�|�j!�|��j���q�n��Wd�QX|�S(���s3���Prepare a requirement to be obtained from req.link.RI���sD���Could not install requirement {} because of HTTP error {} for URL {}s*���Link is a directory, ignoring download_dirs���Saved %sN("���R5���R3���R����Rn���R����RH���R���R����Rp���R����RG���R����R���R���R����R:���t���local_file_pathR.���R*���R+���R,���Rk���RP���R���RW���Rs���Rt���R~���RN���t���copyR ���R����Rj���t���archive( ���R<���R)���R����R5���RH���t ���local_filet���excR-���t���download_locationR����(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pyt���prepare_linked_requirement���sD���� c������ ���C���s����|�j��s�t�d�����t�j�d�|���t�������|��j�rP�t�d�j�|�������n��|�j�|��j ���|�j �|��j���t�|�|��j �|��j�|��j���}�|��j�r��|�j�|��j���n��|�j�|��j���Wd�QX|�S(���s(���Prepare an editable requirement s-���cannot prepare a non-editable req as editables���Obtaining %sso���The editable requirement {} cannot be installed when requiring hashes, because there is no single file to hash.N(���t���editableR3���RP���R���R���R����R���R����R����R����t���update_editableR����R.���R*���R+���R,���R����RH���t���check_if_existsR����(���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/_internal/operations/prepare.pyt���prepare_editable_requirement���s���� c���������C���s����|�j��s�t�d�����|�d�k �s9�t�d�j�|�j��������t�j�d�|�|�|�j��j���t�����*�|��j�rx�t�j �d���n��t �|���}�Wd�QX|�S(���s1���Prepare an already-installed requirement s(���req should have been satisfied but isn'tsA���did not get skip reason skipped but req.satisfied_by is set to {}s���Requirement %s: %s (%s)s����Since it is already installed, we are trusting this package without checking its hash. To ensure a completely repeatable environment, install into an empty virtualenv.N(���t���satisfied_byR3���R2���R����RP���R���t���versionR���R����t���debugR���(���R<���R)���t���skip_reasonR-���(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pyt���prepare_installed_requirement��s���� ( ���R>���R?���t���__doc__R=���t���propertyR����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/_internal/operations/prepare.pyR����=��s��� - !4 (M���R����t���loggingRD���RW���RN���t���pip._vendor.sixR����t���pip._internal.distributionsR���t%���pip._internal.distributions.installedR���t���pip._internal.exceptionsR���R���R���R���R���R���R ���t���pip._internal.utils.filesystemR ���t���pip._internal.utils.hashesR���t���pip._internal.utils.loggingR���t���pip._internal.utils.miscR ���R���R���R���t���pip._internal.utils.temp_dirR���t���pip._internal.utils.typingR���t���pip._internal.utils.unpackingR���t���pip._internal.vcsR���t���typingR���R���R���R���t���mypy_extensionsR���R���t"���pip._internal.index.package_finderR���t���pip._internal.models.linkR���t���pip._internal.network.downloadR���t���pip._internal.req.req_installR���t���pip._internal.req.req_trackerR���R ���RR���t���boolR����R!���R2���t ���getLoggerR>���RP���R.���R8���t���objectR9���RM���RV���Rf���Ri���Rp���RF���RC���R����(����(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pyt���<module>���sp���4 "" ""+