File manager - Edit - /home/newsbmcs.com/public_html/static/img/logo/distributions.tar
Back
installed.py 0000644 00000001250 15030751576 0007104 0 ustar 00 from pip._internal.distributions.base import AbstractDistribution from pip._internal.index.package_finder import PackageFinder from pip._internal.metadata import BaseDistribution class InstalledDistribution(AbstractDistribution): """Represents an installed package. This does not need any preparation as the required information has already been computed. """ def get_metadata_distribution(self) -> BaseDistribution: assert self.req.satisfied_by is not None, "not actually installed" return self.req.satisfied_by def prepare_distribution_metadata( self, finder: PackageFinder, build_isolation: bool ) -> None: pass base.py 0000644 00000002224 15030751576 0006041 0 ustar 00 import abc from pip._internal.index.package_finder import PackageFinder from pip._internal.metadata.base import BaseDistribution from pip._internal.req import InstallRequirement class AbstractDistribution(metaclass=abc.ABCMeta): """A base class for handling installable artifacts. The requirements for anything installable are as follows: - we must be able to determine the requirement name (or we can't correctly handle the non-upgrade case). - for packages with setup requirements, we must also be able to determine their requirements without installing additional packages (for the same reason as run-time dependencies) - we must be able to create a Distribution object exposing the above metadata. """ def __init__(self, req: InstallRequirement) -> None: super().__init__() self.req = req @abc.abstractmethod def get_metadata_distribution(self) -> BaseDistribution: raise NotImplementedError() @abc.abstractmethod def prepare_distribution_metadata( self, finder: PackageFinder, build_isolation: bool ) -> None: raise NotImplementedError() __pycache__/sdist.cpython-310.pyc 0000644 00000010471 15030751576 0012617 0 ustar 00 o �7]h{ � @ s� d dl Z d dlmZmZmZ d dlmZ d dlmZ d dl m Z d dlmZ d dl mZ d dlmZ e �e�ZG d d � d e�ZdS )� N)�Iterable�Set�Tuple)�BuildEnvironment)�AbstractDistribution)�InstallationError)� PackageFinder)�BaseDistribution)�runner_with_spinner_messagec @ s� e Zd ZdZdefdd�Zdededdfdd �Zdeddfd d�Z de e fdd �Zde e fdd�Z deddfdd�Zdedeeeef ddfdd�ZdS )�SourceDistributionz�Represents a source distribution. The preparation step for these needs metadata for the packages to be generated, either using PEP 517 or using the legacy `setup.py egg_info`. �returnc C s | j �� S �N)�req�get_dist)�self� r �C/usr/lib/python3/dist-packages/pip/_internal/distributions/sdist.py�get_metadata_distribution s z,SourceDistribution.get_metadata_distribution�finder�build_isolationNc C sF | j �� | j jo |}|r| �|� | j �� | �|� | j �� d S r )r �load_pyproject_toml� use_pep517�_prepare_build_backend�isolated_editable_sanity_check�_install_build_reqs�prepare_metadata)r r r �should_isolater r r �prepare_distribution_metadata s z0SourceDistribution.prepare_distribution_metadatac C s� | j j}|d us J �t� | j _| j jj||ddd� | j j�| j j�\}}|r-| �d|� |rFt� d| j � t� dd� ttt |���� d S d S )N�overlayzbuild dependencies��kindz"PEP 517/518 supported requirementsz4Missing build requirements in pyproject.toml for %s.z`The project does not specify a build backend, and pip cannot fall back to setuptools without %s.z and )r �pyproject_requiresr � build_env�install_requirements�check_requirements�requirements_to_check�_raise_conflicts�logger�warning�join�map�repr�sorted)r r r! �conflicting�missingr r r r 1 s* �����z)SourceDistribution._prepare_build_backendc C � | j j�7 td�}| j j}|d usJ �|�|�� |�� W d � W d � S 1 s.w Y W d � d S 1 s>w Y d S )Nz#Getting requirements to build wheel)r r"