<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
U
    Ê—Re›  ã                   @   sˆ   d dl Z d dlZd dlZd dlmZ d dlmZmZ d dlm	Z	m
Z
 ddgZeedœdd	„Zeee dœd
d„Zeee dœdd„ZdS )é    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  dd| ¡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-python38-pip-22.2.1-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/pip/_internal/utils/egg_link.pyÚ_egg_link_name   s    r   c                 C   s:   t | ƒ}tjD ]&}tj ||¡}tj |¡r|  S qdS )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ƒ sBtrB| t¡ ntr8| t¡ | t¡ t| ƒ}|D ]&}tj ||¡}tj 	|¡rN|  S qNdS )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   þ	