File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/pip/_internal/utils/__pycache__/egg_link.cpython-310.pyc
Back
o ;j� � @ sn d dl mZ d dlZd dlZd dlZd dlmZmZ d dlm Z m Z ddgZddd�Zddd�Z ddd�ZdS )� )�annotationsN)� site_packages� user_site)�running_under_virtualenv�virtualenv_no_global�egg_link_path_from_sys_path�egg_link_path_from_location�raw_name�str�return� list[str]c 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 �P/opt/saltstack/salt/lib/python3.10/site-packages/pip/_internal/utils/egg_link.py�_egg_link_names s �r � str | Nonec C sH t | �}tjD ]}|D ]}tj�||�}tj�|�r | S qqdS )zJ Look for a .egg-link file for project name, by walking sys.path. N)r �sys�path�os�join�isfile)r �egg_link_namesZ path_item� egg_link_nameZegg_linkr r r r "