<!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
    ë˜Red  ã                   @   sŽ   d dl mZ d dlmZ d dlmZmZ d dlZd dlZd dl	Z	d dl
Z
d dlmZ d dlmZ d dlZG dd„ dejeƒZG d	d
„ d
ƒZdS )é    )Úconvert_path)Úlog)ÚDistutilsErrorÚDistutilsOptionErrorN)Úeasy_install)Ú
namespacesc                   @   sv   e Zd ZdZdZejddg Zejdg ZdZdd„ Z	d	d
„ Z
dd„ Zedd„ ƒZdd„ Zdd„ Zdd„ Zdd„ ZdS )ÚdevelopzSet up package for developmentz%install package in 'development mode')Ú	uninstallÚuzUninstall this source package)z	egg-path=Nz-Set the path to be used in the .egg-link filer	   Fc                 C   s2   | j rd| _|  ¡  |  ¡  n|  ¡  |  ¡  d S )NT)r	   Zmulti_versionÚuninstall_linkZuninstall_namespacesÚinstall_for_developmentZwarn_deprecated_options©Úself© r   ú/builddir/build/BUILDROOT/alt-python38-setuptools-58.3.0-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/setuptools/command/develop.pyÚrun   s    
zdevelop.runc                 C   s&   d | _ d | _t | ¡ d | _d| _d S )NÚ.)r	   Úegg_pathr   Úinitialize_optionsÚ
setup_pathZalways_copy_fromr   r   r   r   r   %   s
    
zdevelop.initialize_optionsc                 C   s  |   d¡}|jr,d}|j|jf}t|| ƒ‚|jg| _t | ¡ |  ¡  |  	¡  | j
 t d¡¡ |jd }tj | j|¡| _|j| _| jd kr tj |j¡| _t | j¡}t tj | j| j¡¡}||krØtd| ƒ‚tj|t |tj |j¡¡|jd| _|  | j| j| j¡| _d S )NÚegg_infoz-Please rename %r to %r before using 'develop'z*.eggz	.egg-linkzA--egg-path must be a relative path from the install directory to ©Úproject_name)Úget_finalized_commandZbroken_egg_infor   r   Úegg_nameÚargsr   Úfinalize_optionsÚexpand_basedirsÚexpand_dirsZpackage_indexÚscanÚglobÚosÚpathÚjoinÚinstall_dirÚegg_linkÚegg_baser   ÚabspathÚpkg_resourcesÚnormalize_pathr   ÚDistributionÚPathMetadataÚdistÚ_resolve_setup_pathr   )r   ÚeiÚtemplater   Zegg_link_fnÚtargetr   r   r   r   r   ,   sF    




ÿÿÿýýzdevelop.finalize_optionsc                 C   sn   |   tjd¡ d¡}|tjkr0d| d¡d  }t tj 	|||¡¡}|t tj¡krjt
d|t tj¡ƒ‚|S )zµ
        Generate a path from egg_base back to '.' where the
        setup script resides and ensure that path points to the
        setup path from $install_dir/$egg_path.
        ú/z../é   zGCan't get a consistent path to setup script from installation directory)Úreplacer!   ÚsepÚrstripÚcurdirÚcountr(   r)   r"   r#   r   )r&   r$   r   Zpath_to_setupÚresolvedr   r   r   r-   W   s    
ÿ
üzdevelop._resolve_setup_pathc              	   C   s    |   d¡ | jddd |   d¡ tjr:|  tj¡ d t_|  ¡  t d| j| j	¡ | j
sˆt| jdƒ}| | jd | j ¡ W 5 Q R X |  d | j| j ¡ d S )Nr   Ú	build_extr2   )ZinplacezCreating %s (link to %s)ÚwÚ
)Úrun_commandÚreinitialize_commandÚ
setuptoolsZbootstrap_install_fromr   Zinstall_namespacesr   Úinfor%   r&   Údry_runÚopenÚwriter   r   Zprocess_distributionr,   Úno_deps)r   Úfr   r   r   r   m   s    

 zdevelop.install_for_developmentc                 C   s¢   t j | j¡rzt d| j| j¡ t| jƒ}dd„ |D ƒ}| ¡  || j	g| j	| j
gfkrht d|¡ d S | jszt  | j¡ | jsŒ|  | j¡ | jjržt d¡ d S )NzRemoving %s (link to %s)c                 S   s   g | ]}|  ¡ ‘qS r   )r5   )Ú.0Úliner   r   r   Ú
<listcomp>‡   s     z*develop.uninstall_link.<locals>.<listcomp>z$Link points to %s: uninstall abortedz5Note: you must uninstall or replace scripts manually!)r!   r"   Úexistsr%   r   r?   r&   rA   Úcloser   r   Úwarnr@   ÚunlinkZ
update_pthr,   ÚdistributionÚscripts)r   Zegg_link_fileÚcontentsr   r   r   r   ƒ   s    
zdevelop.uninstall_linkc              
   C   s€   || j k	rt | |¡S |  |¡ | jjp*g D ]N}tj t	|ƒ¡}tj 
|¡}t |¡}| ¡ }W 5 Q R X |  ||||¡ q,d S ©N)r,   r   Úinstall_egg_scriptsÚinstall_wrapper_scriptsrL   rM   r!   r"   r'   r   ÚbasenameÚiorA   ÚreadZinstall_script)r   r,   Úscript_nameZscript_pathÚstrmÚscript_textr   r   r   rP   ”   s    

zdevelop.install_egg_scriptsc                 C   s   t |ƒ}t | |¡S rO   )ÚVersionlessRequirementr   rQ   ©r   r,   r   r   r   rQ   ¦   s    zdevelop.install_wrapper_scriptsN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Údescriptionr   Úuser_optionsÚboolean_optionsZcommand_consumes_argumentsr   r   r   Ústaticmethodr-   r   r   rP   rQ   r   r   r   r   r      s"   þ	+
r   c                   @   s(   e Zd ZdZdd„ Zdd„ Zdd„ ZdS )	rX   a©  
    Adapt a pkg_resources.Distribution to simply return the project
    name as the 'requirement' so that scripts will work across
    multiple versions.

    >>> from pkg_resources import Distribution
    >>> dist = Distribution(project_name='foo', version='1.0')
    >>> str(dist.as_requirement())
    'foo==1.0'
    >>> adapted_dist = VersionlessRequirement(dist)
    >>> str(adapted_dist.as_requirement())
    'foo'
    c                 C   s
   || _ d S rO   )Ú_VersionlessRequirement__distrY   r   r   r   Ú__init__º   s    zVersionlessRequirement.__init__c                 C   s   t | j|ƒS rO   )Úgetattrrb   )r   Únamer   r   r   Ú__getattr__½   s    z"VersionlessRequirement.__getattr__c                 C   s   | j S rO   r   r   r   r   r   Úas_requirementÀ   s    z%VersionlessRequirement.as_requirementN)rZ   r[   r\   r]   rc   rf   rg   r   r   r   r   rX   «   s   rX   )Údistutils.utilr   Ú	distutilsr   Údistutils.errorsr   r   r!   r    rS   r(   Zsetuptools.command.easy_installr   r>   r   ZDevelopInstallerr   rX   r   r   r   r   Ú<module>   s    