Файловый менеджер - Редактировать - /home/digitalm/venv/lib/python3.7/site-packages/pip/_internal/utils/__pycache__/egg_link.cpython-37.pyc
Назад
B �5�g� � @ s� d dl Z d dlZd dlZd dlmZmZ d dlmZmZ d dl m Z mZ ddgZe ee d�dd �Ze ee d�d d�Ze ee d�dd�ZdS )� N)�List�Optional)� site_packages� user_site)�running_under_virtualenv�virtualenv_no_global�egg_link_path_from_sys_path�egg_link_path_from_location)�raw_name�returnc C s t �dd| �d | � d�gS )a� Convert a Name metadata value to a .egg-link name, by applying the same substitution as pkg_resources's safe_name function. Note: we cannot use canonicalize_name because it has a different logic. We also look for the raw name (without normalization) as setuptools 69 changed the way it names .egg-link files (https://github.com/pypa/setuptools/issues/4167). z[^A-Za-z0-9.]+�-z .egg-link)�re�sub)r � r �=/tmp/pip-install-251nq386/pip/pip/_internal/utils/egg_link.py�_egg_link_names s r c C sH t | �}x:tjD ]0}x*|D ]"}tj�||�}tj�|�r|S qW qW dS )zJ Look for a .egg-link file for project name, by walking sys.path. N)r �sys�path�os�join�isfile)r �egg_link_names� path_item� egg_link_name�egg_linkr r r r ! s c C s� g }t � r*|�t� t� sBtrB|�t� ntr8|�t� |�t� t| �}x8|D ]0}x*|D ]"}tj�||�}tj� |�rZ|S qZW qPW dS )a Return the path for the .egg-link file if it exists, otherwise, None. There's 3 scenarios: 1) not in a virtualenv try to find in site.USER_SITE, then site_packages 2) in a no-global virtualenv try to find in site_packages 3) in a yes-global virtualenv try to find in site_packages, then site.USER_SITE (don't look in global location) For #1 and #3, there could be odd cases, where there's an egg-link in 2 locations. This method will just return the first one found. N) r �appendr r r r r r r r )r �sitesr �siter �egglinkr r r r . s )r r r �typingr r �pip._internal.locationsr r Zpip._internal.utils.virtualenvr r �__all__�strr r r r r r r �<module> s
| ver. 1.4 |
Github
|
.
| PHP 8.3.23 | Генерация страницы: 0.06 |
proxy
|
phpinfo
|
Настройка