%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/share/python3/__pycache__/
Upload File :
Create Path :
Current File : //usr/share/python3/__pycache__/py3versions.cpython-312.pyc

�

���f2���ddlZddlZddlZdadadaejjdd�jd�D�cgc]%}|j�rd|j�z��'c}a
dadd�Zd�Z
d�Zdd	�Zdd
�Zdd�Zdd�Zdd
�Zdd�Zdd�ZGd�de�ZGd�de�Zd�Z	d�Zedk(re�yycc}w)�N�DEBPYTHON3_SUPPORTED��,�python%sc�(�ddlm}m}tsTtj
j
d�r5|�}td�}|j|�|j�|atr|r	tjd|�}|Sy#|$rt�wxYw)Nr)�ConfigParser�
NoOptionErrorz"/usr/share/python3/debian_defaults�DEFAULT)�configparserrr	�	_defaults�os�path�exists�open�	read_file�close�get�
ValueError)�namerr	�config�defaultsfile�values      �!/usr/share/python3/py3versions.py�read_defaultrs���8��
�7�7�>�>�>�?�!�^�F�� D�E�L����\�*���� ��I��T�	��M�M�)�T�2�E������	���	�s�,B�Bc�D�td�|jd�D��S)Nc3�2K�|]}t|����y�w�N)�int)�.0�parts  r�	<genexpr>z#version_to_tuple.<locals>.<genexpr>(s����:�t��T��:����.)�tuple�split)�versions r�version_to_tupler''s���:�w�}�}�S�'9�:�:�:�c
��t|jd��dkDrtd��ddl}|j|j|j
|j|jd�}i}t�}ttd���}d}|jd�D]�}|j�}|d	k(r�|d
vr�|jdt��tjd�}|j|�}		|	std
��|	jd�|	jd�}}
|jd�\}}
t!|�dkr��|
dvr|j#|�n2d}||
}|D�cgc] }|t%|�t%|��s�|��"}}��d|vr||d<|r|j)|�|d<|Scc}w#t&$rtd
��wxYw)Nr�zDtoo many arguments provided for X-Python3-Version: min and max only.r)N�=z>=z<=z<<T��version_onlyF�all)�current�current_ext�versionsz(>=|<=|<<|=)? *(\d\.\d+)$z'error parsing Python3-Version attribute�r#�)Nr+)�lenr%r�operator�eq�ge�le�lt�set�supported_versions�strip�
setdefault�re�compile�match�groupr�addr'�	Exception�union)�vstringr5�	operators�vinfo�exact_versions�
version_range�
relop_seen�field�ve�m�op�v�vmaj�vmin�filtop�avs                r�parse_versionsrT+s���
�7�=�=�����"��_�`�`���{�{�����{�{�(�+�+��{�{�$�I�
�E��U�N��*��=�>�M��J����s�#�H�����
���E�>���.�.��
����S�U�+�
�Z�Z�4�
5���H�H�U�O��	H�� �!J�K�K��G�G�A�J�����
��B������J�D�$��4�y�1�}���[� ��"�"�1�%�!�
�"�2���.;�!@��v�$�R�(�*:�1�*=�@?��!@�
�!@��+H�2�U��*��j��� .� 4� 4�]� C�E�*���L��!@���	H��F�G�G�	H�s+�:AF<�!F<�- F7�F7�F<�7F<�<Gc���ts9	td�}|jd�D�cgc]}|j���c}a|rtD�cgc]}|dd��	c}StScc}w#t$rgaY�1wxYwcc}w)Nzold-versionsr�)�
_old_versionsrr%r<r�r-r�srOs    r�old_versionsrZVss���	� ��0�E�05���C�0@�A�1�Q�W�W�Y�A�M��,�-�!��!�"��-�-����
B���	��M�	��.�'�A$�A�A$�
A5�A$�$A2�1A2c���ts9	td�}|jd�D�cgc]}|j���c}a|rtD�cgc]}|dd��	c}StScc}w#t$rgaY�1wxYwcc}w)Nzunsupported-versionsrrV)�_unsupported_versionsrr%r<rrXs    r�unsupported_versionsr^dsv�� �	'� �!7�8�E�8=���C�8H�$I�1�Q�W�W�Y�$I�!��4�5�!��!�"��5�5�$�$��
%J���	'�$&�!�	'��6r[c	��t�ts9	td�}|jd�D�cgc]}|j	���c}atj%tj't(��}	tj+�tj-|	�|rtD�
cgc]}
|
d
d��	c}
StScc}w#t
$r�gd�}	ddl}|j|dd|j��}|j}n3#t$r'tjdj|��}YnwxYwd}|D]F}|jd	�s�|jd
d�dj	�jd�}�H|j�|D�cgc]}t!j"dd|���ncc}w}}|aY��vwxYwcc}
w)Nzsupported-versionsr)z/usr/bin/apt-cachez--no-all-versions�showzpython3-allrr2F)�bufsize�shell�stdout� zDepends:�:z\s*(\S+)[ (]?.*z\1rV)�default_version�_supported_versionsrr%r<r�
subprocess�Popen�PIPErc�ImportErrorr
�popen�join�
startswithrr>�sub�pop�index�_default_version�sort�append)r-rrY�cmdrh�p�fd�depends�line�defaultrOs           rr;r;rs������	*� �!5�6�E�6;�k�k�#�6F�"G��1�7�7�9�"G��$"�%�%�&9�&?�&?�@P�&Q�R�G��������w�'��2�3�!��!�"��3�3�"�"��1#H���	*�*�C�
-�!��$�$�S�!�+0����%�J���X�X����
-��X�X�c�h�h�s�m�,��
-���G��
G���?�?�:�.�"�j�j��a�0��3�9�9�;�A�A�#�F�G�
G�
�H�H�J�EL�M��r�v�v�0�%��;�M��M�G�M�")��!	*��*4s_�C�B>�C�)G�>C�
G�/D�G�-D1�.G�0D1�1G�
AG�F4�3
G�Gc���tstjd�atd�}t|tjjd|�fvrt
d|z��|a|r	tddStS)Nz/usr/bin/python3zdefault-versionz/usr/binzkthe symlink /usr/bin/python3 does not point to the python3 default version. It must be reset to point to %srV)rrr
�readlinkrrrmr)r-�debian_defaults  rrfrf�st����;�;�'9�:��!�"3�4�N��������Z��0X�Y�Y��*�,:�;�<�	<�&������#�#��r(c���t�d}t|�}td��}t|�dk(rz|dj	|�}g}|D]}|j|��	|j
|jtdd��}|j�|r|j|�ntd��|std��|r|S|D�cgc]}d	|z��	c}S#d}Y�YxYwcc}w)
NTr,r2r1rVrz/No supported python3 versions in version stringzempty set of versionsr)rfrTr;r4�intersectionrtrprqrrrsr)	rEr-r1rG�	supported�vlr&rzrOs	         r�requested_versionsr��s������H��7�#�E�"��5�I�
�5�z�Q����$�1�1�)�<��
���3�G����7�!3�3�	��f�f�R�X�X�&6�q�r�&:�;�<�G�	���	���I�I�g���J�K�K���0�1�1���	�(*�+�1�
�Q��+�+��	��G��,s�!'C�C$�C!c�\�ddl}t�}|jd�|jd�zD�cgc]B}tjj	|�|vrtjj	|���D}}|j�|r|D�cgc]}|dd��	c}S|Scc}wcc}w)Nrz/usr/bin/python3.[0-9]z/usr/bin/python3.[0-9][0-9]rV)�globr;r
r�basenamers)r-r�r�rYr1rOs      r�installed_versionsr��s����"�$�I����#;�<�t�y�y�If�?g�g�5���7�7�#�#�A�&�)�3���� � ��#�5�H�5�
�M�M�O��'�(�!��!�"��(�(����5��
)s�AB$�B)c�R�td�}|d�|D��}d|z}|r|Sd|zS)NTc3�2K�|]}t|����y�wr)r')r�vers  rr!z+minmax_supported_version.<locals>.<genexpr>�s����N�s�%�c�*�N�r"z%d.%d�python)r;)�minmaxr-�supported_versions_listr&�version_strs     r�minmax_supported_versionr��s<��0��6���N�6M�N�N�G��G�#�K�����+�%�%r(c��eZdZy)�ControlFileValueErrorN��__name__�
__module__�__qualname__�r(rr�r�����r(r�c��eZdZy)�MissingVersionValueErrorNr�r�r(rr�r��r�r(r�c��d}d}d}t|d��5}|D�cgc]}|j���}}ddd�D]�}|dk(r|dk7r
|dk(rn�d}�|jd�rd}�+|jd|z�r|}�B|j�jd�s�b|dk7rt	d	��|jd
d�dj�}��|�t
d��|dk(r|�td
��|S|Scc}w#1swY��xYw)zFread the debian/control file, extract the X-Python3-Version
    field.Nzutf-8)�encodingr�SourcezSource:z	Package: zx-python3-version:z1attribute X-Python3-Version not in Source sectionrer2znot a control filez$no X-Python3-Version in control file)rr<rn�lowerrr%r�r�)�fn�pkgr&�sversion�section�controlfilery�liness        r�extract_pyversion_attributer��s!���G��H��G�	
�b�7�	#�7�{�*5�6�$�����6��6�7��5���2�:�'�T�/��h����G�
�_�_�Y�
'��G�
�_�_�[�3�.�
/��G�
�Z�Z�\�
$�
$�%9�
:��(�"� �!T�U�U��z�z�#�q�)�!�,�2�2�4�H�5���#�$8�9�9�
�h����*�+Q�R�R����N��)7�7�7�s�C;�C6�C;�6C;�;Dc�Z�ddlm}d}	||��}|jddddd	�
�|jddd
dd�
�|jddddd�
�|jddddd�
�|jdddd�
�|jdddd�
�|jdddd dd!�"�|j�\}}tj
j
tjd�}|jr.t|�dk(r 	tt|j��y|j r<t|�dk(r.td%j#t%|j���y|j&r<t|�dk(r.td%j#t)|j���y|j*r2t|�dk(r$tt-t.|j��y|j0r2t|�dk(r$tt-t2|j��y|j4r�t|�d$kr�t|�dk(rd&}n|d}	tj
j7|�r&|}	t9|d'�}	t;|	|j�}
nt;||j�}
td%j#
��ytj>jAd-|�d%|�d,��tjd$�y#t$r.}td#|z|�tjd$�Yd}~yd}~wwxYw#t<$r=tj>jA|�d(|�d)��tjd$�Y��tB$r;tj>jAd*|z�t%|j�}
Y��wxYw#t$rD}tj>jA|�d+|�d,��tjd$�Yd}~yd}~wwxYw).Nr)�OptionParserz;[-v] [-h] [-d|--default] [-s|--supported] [-i|--installed] )�usagez-dz	--defaultz!print the default python3 version�
store_truerz)�help�action�destz-sz--supportedz$print the supported python3 versionsr�z-rz--requestedz�print the python3 versions requested by a build; the argument is either the name of a control file or the value of the X-Python3-Version attribute�	requestedz-iz--installedz.print the installed supported python3 versions�	installedz--min-supportedz+print the minimum supported python3 version�minsupportedz--max-supportedz+print the maximum supported python3 version�maxsupportedz-vz	--versionz print just the version number(s)Fr-)r�rzr�r�z%s:r2rdzdebian/controlr�z: not a control file: z, zC%s: no X-Python3-Version in control file, using supported versions
z: �
zusage: )"�optparser��
add_option�
parse_argsr
rr��sys�argvrzr4�printrfr-r�exitr�rmr;r�r�r�r��minr��maxr��isfiler�r�r��stderr�writer�)r�r��parser�opts�args�program�msgr1r�rE�vss           r�mainr�s���%�I�E�6�
��
&�F�
���d�K�>�)�	��;����d�M�A�)���=����d�M�M�*��	�=�
���d�M�K�)���=����'�H�)���@����'�H�)���@����d�K�=�#�L�~��O��"�"�$�J�D�$��g�g���s�x�x��{�+�G��|�|��D�	�Q��	��/�$�"3�"3�4�5�
���C��I��N�
�c�h�h�)�$�*;�*;�<�=�>�	
���C��I��N�
�c�h�h�)�$�*;�*;�<�=�>�	
�	�	�s�4�y�A�~�
�&�s�D�,=�,=�>�?�	
�	�	�s�4�y�A�~�
�&�s�D�,=�,=�>�?�	
���C��I��N��t�9��>�'�H��A�w�H�	��w�w�~�~�h�'���?�9�"�h�G�G�+�G�T�5F�5F�G�B�(��$�2C�2C�D���#�(�(�2�,��
	�
�
���W�e�<�=�������O�	��%�'�/�3�'��H�H�Q�K�K��	��,-� ��J�J�$�$�(/��&5�6��H�H�Q�K�/�?��J�J�$�$�&H�%,�&-�.�,�D�,=�,=�>�B�	?���	��J�J���7�C�8�9��H�H�Q�K�K��	�sa�
L�&!O�"M�*1O�	M�!$M
�
M�AO�O�?O�O�O�O�	P*�&:P%�%P*�__main__r)F)r
r>r�rrWr]�environrr%r<rgrrrr'rTrZr^r;rfr�r�r�rr�r�r�r�r�)r�s0r�<module>r�s���
�	�
��	��
����z�z�~�~�&<�b�A�G�G��L�'�C��)�)�+�"�C�I�I�K�/�'�����(;�(�V�%�#�B �",�6
�&�	�J�	�	�z�	��>�<I�V�z���F���y
's�*C

Zerion Mini Shell 1.0