PATH:
opt
/
alt
/
python310
/
lib
/
python3.10
/
site-packages
/
pip
/
_internal
/
utils
/
__pycache__
o ai� � @ s� d dl Z d dlZd dlZd dlmZ d dlmZmZ d dlm Z m Z ddgZdedefd d �Z dedee fdd�Zdedee fdd�ZdS ) � N)�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 S )z� 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. z[^A-Za-z0-9.]+�-z .egg-link)�re�sub)r � r ��/builddir/build/BUILDROOT/alt-python310-pip-21.3.1-5.el8.x86_64/opt/alt/python310/lib/python3.10/site-packages/pip/_internal/utils/egg_link.py�_egg_link_name s r c C s: t | �}tjD ]}tj�||�}tj�|�r| S qdS )zJ Look for a .egg-link file for project name, by walking sys.path. N)r �sys�path�os�join�isfile)r � egg_link_name� path_item�egg_linkr r r r s �c C sz g }t � r|�t� t� str|�t� ntr|�t� |�t� t| �}|D ]}tj�||�}tj� |�r:| S q'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 �site�egglinkr r r r * s � �)r r r �typingr �pip._internal.locationsr r �pip._internal.utils.virtualenvr r �__all__�strr r r r r r r �<module> s �
[-] subprocess.cpython-310.pyc
[edit]
[-] parallel.cpython-310.pyc
[edit]
[-] entrypoints.cpython-310.pyc
[edit]
[-] compat.cpython-310.pyc
[edit]
[-] egg_link.cpython-310.pyc
[edit]
[-] direct_url_helpers.cpython-310.pyc
[edit]
[-] temp_dir.cpython-310.pyc
[edit]
[-] misc.cpython-310.pyc
[edit]
[-] __init__.cpython-310.pyc
[edit]
[-] wheel.cpython-310.pyc
[edit]
[-] packaging.cpython-310.pyc
[edit]
[-] hashes.cpython-310.pyc
[edit]
[-] datetime.cpython-310.pyc
[edit]
[-] virtualenv.cpython-310.pyc
[edit]
[-] appdirs.cpython-310.pyc
[edit]
[-] deprecation.cpython-310.pyc
[edit]
[+]
..
[-] pkg_resources.cpython-310.pyc
[edit]
[-] inject_securetransport.cpython-310.pyc
[edit]
[-] encoding.cpython-310.pyc
[edit]
[-] filesystem.cpython-310.pyc
[edit]
[-] setuptools_build.cpython-310.pyc
[edit]
[-] unpacking.cpython-310.pyc
[edit]
[-] logging.cpython-310.pyc
[edit]
[-] filetypes.cpython-310.pyc
[edit]
[-] glibc.cpython-310.pyc
[edit]
[-] compatibility_tags.cpython-310.pyc
[edit]
[-] _log.cpython-310.pyc
[edit]
[-] urls.cpython-310.pyc
[edit]
[-] models.cpython-310.pyc
[edit]
[-] distutils_args.cpython-310.pyc
[edit]