HOME


Mini Shell 1.0
DIR: /proc/self/root/lib/python3/dist-packages/setuptools/command/__pycache__/
Upload File :
Current File : //proc/self/root/lib/python3/dist-packages/setuptools/command/__pycache__/develop.cpython-312.pyc
�


_�dB���ddlmZddlmZddlmZddlZddlZddlZddl	m
Z
ddlmZddlm
Z
ddlZGd�d	e
je
�ZGd
�d�Zy)�)�convert_path)�log)�DistutilsOptionErrorN)�easy_install)�_path)�
namespacesc��eZdZdZdZejddgzZejdgzZdZd�Z	d�Z
d	�Zed
��Z
d�Zd�Zd
�Zd�Zy)�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 filerFc��|jr(d|_|j�|j�n|j	�|j�y)NT)r�
multi_version�uninstall_link�uninstall_namespaces�install_for_development�warn_deprecated_options��selfs �</usr/lib/python3/dist-packages/setuptools/command/develop.py�runzdevelop.runsA���>�>�!%�D�����!��%�%�'��(�(�*��$�$�&�c�f�d|_d|_tj|�d|_d|_y)N�.)r�egg_pathr�initialize_options�
setup_path�always_copy_fromrs rrzdevelop.initialize_options%s-�������
��'�'��-���� #��rc	�<�ddl}|jd�}|jg|_t	j
|�|j
�|j�|jjtjd��|jdz}tjj|j|�|_|j |_|j"�.tjj%|j �|_t'j(|j �}t'j(tjj|j|j"��}||k7rt+d|z��|j-||j/|tjj%|j0��|j��|_|j5|j |j|j"�|_y)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_dirs�
package_index�scan�glob�os�path�join�install_dir�egg_link�egg_baser�abspathr�normpathr�Distribution�PathMetadatar�dist�_resolve_setup_pathr)rr"�ei�egg_link_fn�targetrs      rr&zdevelop.finalize_options,s����
�
'�
'�
�
3���[�[�M��	��%�%�d�+���������������	�	�'� 2�3��k�k�K�/�������T�%5�%5�{�C��
�����
��=�=� ��G�G�O�O�B�K�K�8�D�M�����
�
�.���>�>�"�'�'�,�,�t�/?�/?����"O�P���v��&�!�#)�*��
�"�.�.���&�&�v�r�w�w���r�{�{�/K�L����/�
��	��2�2��M�M�����M�M�
��rc��|jtjd�jd�}|tjk7rd|jd�dzz}t
jtjj|||��}t
jtj�}||k7r
td||��|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�countrr3r-r.r)r1r/r�
path_to_setup�resolvedrAs      rr7zdevelop._resolve_setup_pathSs���!�(�(�����5�<�<�S�A�
��B�I�I�%�!�]�%8�%8��%=��%A�B�M��>�>�"�'�'�,�,�{�H�m�"T�U������	�	�*���v��&�*���	�
��rc�l�|jd�|jdd��|jd�tjr*|j	tj�dt_|j�t
jd|j|j�|jsJt|jd�5}|j|jdz|jz�ddd�|jd|j |j"�y#1swY�2xYw)Nr�	build_extr=)�inplacezCreating %s (link to %s)�w�
)�run_command�reinitialize_command�
setuptools�bootstrap_install_fromr�install_namespacesr�infor0r1�dry_run�open�writerr�process_distributionr6�no_deps)r�fs  rrzdevelop.install_for_developmenths�������$�	
�!�!�+�q�!�9�����%��,�,����j�?�?�@�04�J�-����!�	���+�T�]�]�D�M�M�J��|�|��d�m�m�S�)�
@�Q�����
�
��,�t���>�?�
@�	
�!�!�$��	�	�t�|�|�3C�D�	
@�
@�s�
,D*�*D3c��tjj|j�r�t	j
d|j|j�t|j�}|D�cgc]}|j���}}|j�||jg|j|jgfvrt	jd|�y|jstj|j�|js|j|j �|j"j$rt	jd�yycc}w)NzRemoving %s (link to %s)z$Link points to %s: uninstall abortedz5Note: you must uninstall or replace scripts manually!)r,r-�existsr0rrOr1rQr@�closerr�warnrP�unlink�
update_pthr6�distribution�scripts)r�
egg_link_file�line�contentss    rrzdevelop.uninstall_link~s���
�7�7�>�>�$�-�-�(��H�H�/�����
�
�N� ����/�M�2?�@�$����
�@�H�@����!������$�-�-����1Q�R�R����?��J���<�<��	�	�$�-�-�(��|�|��O�O�D�I�I�&����$�$��H�H�L�M�%��As�.Ec���||jurtj||�S|j|�|jj
xsgD]�}tjjt|��}tjj|�}tj|�5}|j�}ddd�|j|||���y#1swY� xYw�N)r6r�install_egg_scripts�install_wrapper_scriptsr\r]r,r-r2r�basename�iorQ�read�install_script)rr6�script_name�script_path�strm�script_texts      rrczdevelop.install_egg_scripts�s����t�y�y� ��3�3�D�$�?�?�
	
�$�$�T�*� �,�,�4�4�:��	M�K��'�'�/�/�,�{�*C�D�K��'�'�*�*�;�7�K�����%�
*��"�i�i�k��
*�����k�;��L�	M�
*�
*�s�/C�C(	c�D�t|�}tj||�Srb)�VersionlessRequirementrrd�rr6s  rrdzdevelop.install_wrapper_scripts�s��%�d�+���3�3�D�$�?�?rN)�__name__�
__module__�__qualname__�__doc__�descriptionr�user_options�boolean_options�command_consumes_argumentsrrr&�staticmethodr7rrrcrd�rrr
r
s{��(�9�K��,�,�;�L�0��L�
#�2�2�k�]�B�O�!&��'�$�%
�N����(E�,N�"M�$@rr
c�"�eZdZdZd�Zd�Zd�Zy)rna�
    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��||_yrb)�_VersionlessRequirement__distros  r�__init__zVersionlessRequirement.__init__�s	����rc�.�t|j|�Srb)�getattrr|)r�names  r�__getattr__z"VersionlessRequirement.__getattr__�s���t�{�{�D�)�)rc��|jSrbr rs r�as_requirementz%VersionlessRequirement.as_requirement�s��� � � rN)rprqrrrsr}r�r�ryrrrnrn�s����*�!rrn)�distutils.utilr�	distutilsr�distutils.errorsrr,r+rf�setuptools.command.easy_installrrLrr�DevelopInstallerr
rnryrr�<module>r�sF��'��1�	��	�8��!��U@�j�)�)�<�U@�p!�!r