Your IP : 3.21.244.34


Current Path : /opt/alt/python311/lib/python3.11/site-packages/setuptools/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib/python3.11/site-packages/setuptools/__pycache__/namespaces.cpython-311.pyc

�

,�Re��p�ddlZddlmZddlZejjZGd�d��ZGd�de��ZdS)�N)�logc�X�eZdZdZd�Zd�Zd�ZdZ	dZ	d�Z	d�Z
d	�Zed
���Z
dS)�	Installerz
-nspkg.pthc���|���}|sdStj�|�����\}}||jz
}|j�|��tj	d|��t|j|��}|jrt|��dSt|d��5}|�|��ddd��dS#1swxYwYdS)Nz
Installing %s�wt)�_get_all_ns_packages�os�path�splitext�_get_target�	nspkg_ext�outputs�appendr�info�map�_gen_nspkg_line�dry_run�list�open�
writelines)�self�nsp�filename�ext�lines�fs      ��/builddir/build/BUILDROOT/alt-python311-setuptools-65.6.3-2.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/setuptools/namespaces.py�install_namespaceszInstaller.install_namespaces
s(���'�'�)�)���	��F���(�(��)9�)9�);�);�<�<�
��#��D�N�"������H�%�%�%����(�+�+�+��D�(�#�.�.���<�	���K�K�K��F�
�(�D�
!�
!�	 �Q�
�L�L�����	 �	 �	 �	 �	 �	 �	 �	 �	 �	 �	 �	 ����	 �	 �	 �	 �	 �	 s�C&�&C*�-C*c��tj�|�����\}}||jz
}tj�|��sdSt
jd|��tj|��dS)NzRemoving %s)	r	r
rrr
�existsrr�remove)rrrs   r�uninstall_namespaceszInstaller.uninstall_namespacessv����(�(��)9�)9�);�);�<�<�
��#��D�N�"���w�~�~�h�'�'�	��F�����)�)�)�
�	�(������c��|jS�N)�target�rs rrzInstaller._get_target's
���{�r#)	zimport sys, types, osz#has_mfs = sys.version_info > (3, 5)z$p = os.path.join(%(root)s, *%(pth)r)z4importlib = has_mfs and __import__('importlib.util')z-has_mfs and __import__('importlib.machinery')z�m = has_mfs and sys.modules.setdefault(%(pkg)r, importlib.util.module_from_spec(importlib.machinery.PathFinder.find_spec(%(pkg)r, [os.path.dirname(p)])))zCm = m or sys.modules.setdefault(%(pkg)r, types.ModuleType(%(pkg)r))z7mp = (m or []) and m.__dict__.setdefault('__path__',[])z(p not in mp) and mp.append(p))z4m and setattr(sys.modules[%(parent)r], %(child)r, m)c��dS)Nz$sys._getframe(1).f_locals['sitedir']�r's r�	_get_rootzInstaller._get_rootEs��5�5r#c��t|�d����}|���}|j}|�d��\}}}|r
||jz
}d�|��t��zdzS)N�.�;�
)�tuple�splitr*�_nspkg_tmpl�
rpartition�_nspkg_tmpl_multi�join�locals)r�pkg�pth�root�
tmpl_lines�parent�sep�childs        rrzInstaller._gen_nspkg_lineHs}���C�I�I�c�N�N�#�#���~�~�����%�
� �^�^�C�0�0����U��	1��$�0�0�J��x�x�
�#�#�f�h�h�.��5�5r#c�|�|jjpg}ttt	|j|������S)z,Return sorted list of all package namespaces)�distribution�namespace_packages�sorted�flattenr�
_pkg_names)r�pkgss  rrzInstaller._get_all_ns_packagesQs4��� �3�9�r���g�c�$�/�4�8�8�9�9�:�:�:r#c#�K�|�d��}|r/d�|��V�|���|�-dSdS)z�
        Given a namespace package, yield the components of that
        package.

        >>> names = Installer._pkg_names('a.b.c')
        >>> set(names) == set(['a', 'a.b', 'a.b.c'])
        True
        r,N)r0r4�pop)r6�partss  rrBzInstaller._pkg_namesVs`�����	�	�#�����	��(�(�5�/�/�!�!�!��I�I�K�K�K��	�	�	�	�	r#N)�__name__�
__module__�__qualname__r
rr"rr1r3r*rr�staticmethodrBr)r#rrr	s��������I� � � �$�������K�((���<�6�6�6�6�6�6�;�;�;�
����\���r#rc��eZdZd�Zd�ZdS)�DevelopInstallerc�D�tt|j����Sr%)�repr�str�egg_pathr's rr*zDevelopInstaller._get_rootgs���C��
�&�&�'�'�'r#c��|jSr%)�egg_linkr's rrzDevelopInstaller._get_targetjs
���}�r#N)rGrHrIr*rr)r#rrLrLfs2������(�(�(�����r#rL)	r	�	distutilsr�	itertools�chain�
from_iterablerArrLr)r#r�<module>rWs���	�	�	�	������������/�
'��Z�Z�Z�Z�Z�Z�Z�Z�z�����y�����r#

?>