HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.7/site-packages/setuptools/command/__pycache__/develop.cpython-37.pyc
B

N��gX�@s�ddlmZddlmZddlmZddlZddlZddlZddl	m
Z
ddlmZddlm
Z
ddlZGdd	�d	e
je
�ZGd
d�d�ZdS)�)�convert_path)�log)�DistutilsOptionErrorN)�easy_install)�_path)�
namespacesc@sveZdZdZdZejddgZejdgZdZdd�Z	d	d
�Z
dd�Zed
d��Z
dd�Zdd�Zdd�Zdd�ZdS)�developzSet up package for developmentz%install package in 'development mode')�	uninstall�uzUninstall this source package)z	egg-path=Nz-Set the path to be used in the .egg-link filer	FcCs2|jrd|_|��|��n|��|��dS)NT)r	Z
multi_version�uninstall_linkZuninstall_namespaces�install_for_developmentZwarn_deprecated_options)�self�r�>/tmp/pip-unpacked-wheel-yrlplx0q/setuptools/command/develop.py�runs
zdevelop.runcCs&d|_d|_t�|�d|_d|_dS)N�.)r	�egg_pathr�initialize_options�
setup_pathZalways_copy_from)r
rrrr%s

zdevelop.initialize_optionscCs�ddl}|�d�}|jg|_t�|�|��|��|j�	t
�
d��|jd}tj�
|j|�|_|j|_|jdkr�tj�|j�|_t�|j�}t�tj�
|j|j��}||kr�td|��|j||�|tj�|j��|jd�|_|�|j|j|j�|_dS)Nr�egg_infoz*.eggz	.egg-linkzA--egg-path must be a relative path from the install directory to )�project_name)�
pkg_resources�get_finalized_command�egg_name�argsr�finalize_options�expand_basedirs�expand_dirsZ
package_index�scan�glob�os�path�join�install_dir�egg_link�egg_baser�abspathr�normpathr�Distribution�PathMetadatar�dist�_resolve_setup_pathr)r
r�eiZegg_link_fn�targetrrrrr,s4




zdevelop.finalize_optionscCsj|�tjd��d�}|tjkr0d|�d�d}t�tj�	|||��}t�tj�}||krft
d||��|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�countrr'r!r"r)r%r#rZ
path_to_setupZresolvedr3rrrr+Ss
zdevelop._resolve_setup_pathc	Cs�|�d�|jddd�|�d�tjr:|�tj�dt_|��t�d|j|j	�|j
s�t|jd��}|�|j
d|j�WdQRX|�d|j|j�dS)Nr�	build_extr/)ZinplacezCreating %s (link to %s)�w�
)�run_command�reinitialize_command�
setuptoolsZbootstrap_install_fromrZinstall_namespacesr�infor$r%�dry_run�open�writerrZprocess_distributionr*�no_deps)r
�frrrrjs

 zdevelop.install_for_developmentcCs�tj�|j�rzt�d|j|j�t|j�}dd�|D�}|��||j	g|j	|j
gfkrht�d|�dS|jszt�
|j�|js�|�|j�|jjr�t�d�dS)NzRemoving %s (link to %s)cSsg|]}|���qSr)r2)�.0�linerrr�
<listcomp>�sz*develop.uninstall_link.<locals>.<listcomp>z$Link points to %s: uninstall abortedz5Note: you must uninstall or replace scripts manually!)r r!�existsr$rr;r%r=�closerr�warnr<�unlinkZ
update_pthr*�distribution�scripts)r
Z
egg_link_file�contentsrrrr�s
zdevelop.uninstall_linkc
Cs�||jk	rt�||�S|�|�x^|jjp,gD]N}tj�t	|��}tj�
|�}t�|��}|�
�}WdQRX|�||||�q.WdS)N)r*r�install_egg_scripts�install_wrapper_scriptsrHrIr r!r&r�basename�ior=�readZinstall_script)r
r*�script_nameZscript_path�strm�script_textrrrrK�s

zdevelop.install_egg_scriptscCst|�}t�||�S)N)�VersionlessRequirementrrL)r
r*rrrrL�szdevelop.install_wrapper_scriptsN)�__name__�
__module__�__qualname__�__doc__�descriptionr�user_options�boolean_optionsZcommand_consumes_argumentsrrr�staticmethodr+rrrKrLrrrrrs	'rc@s(eZdZdZdd�Zdd�Zdd�ZdS)	rSa�
    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'
    cCs
||_dS)N)�_VersionlessRequirement__dist)r
r*rrr�__init__�szVersionlessRequirement.__init__cCst|j|�S)N)�getattrr\)r
�namerrr�__getattr__�sz"VersionlessRequirement.__getattr__cCs|jS)N)r)r
rrr�as_requirement�sz%VersionlessRequirement.as_requirementN)rTrUrVrWr]r`rarrrrrS�s
rS)�distutils.utilr�	distutilsr�distutils.errorsrr rrNZsetuptools.command.easy_installrr:rrZDevelopInstallerrrSrrrr�<module>s