CasperSecurity

Current Path : /usr/lib/python3/dist-packages/wheel/__pycache__/
Upload File :
Current File : //usr/lib/python3/dist-packages/wheel/__pycache__/metadata.cpython-310.pyc

o

c�a��@s\dZddlZddlZddlZddlmZdd�Zdd�Zd	d
�Z	dd�Z
d
d�Zdd�ZdS)z2
Tools for converting old- to new-style metadata.
�N�)�
read_pkg_infocCsRt|dd�rd|jSg}|jD]\}}|�||�q|s dSdd�t|��S)zFReturn the version specifier for a requirement in PEP 345/566 fashion.�urlNz @ �z (%s)�,)�getattrr�specs�append�join�sorted)�requirement�
requires_dist�op�ver�r�0/usr/lib/python3/dist-packages/wheel/metadata.py�requires_to_requires_dist
s
rccsP�|D]"}tj�|�}t|�}d�t|j��}|rd|}|j||VqdS)z=Yield Requires-Dist: strings for parsed requirements strings.rz[%s]N)�
pkg_resources�Requirement�parserr
r�extras�project_name)�requirements�req�parsed_requirement�specrrrr�convert_requirementss��rccs��|��D]D\}}d}|pd}d|vr|�dd�\}}t�|�}|r5d|fV|r/d|d}|d|7}|r;d|}t|�D]	}d	||fVq?qd
S)a,
    Convert requirements from a setup()-style dictionary to ('Requires-Dist', 'requirement')
    and ('Provides-Extra', 'extra') tuples.

    extras_require is a dictionary of {extra: [requirements]} as passed to setup(),
    using the empty extra {'': [requirements]} to hold install_requires.
    r�:r�Provides-Extra�(z) and z
extra == '%s'z ; �
Requires-DistN)�items�splitr�
safe_extrar)�extras_require�extra�depends�	condition�new_reqrrr�generate_requirements%s$�

��r)cCs�t|�}|�dd�|d=|d=tj�|d�}tj�|�r^t|��}|��}Wd�n1s0wYtt	�
|�dd�d	�}|D]\}}t||i�D]\}	}
|	|
f|��vr\|
||	<qLqB|d
}|rn|�
t|��|d
=|S)zN
    Convert .egg-info directory with PKG-INFO to the Metadata 2.1 format
    zMetadata-Versionz2.1rr zrequires.txtNcSs|dpdS)Nrrr)�xrrr�<lambda>Psz%pkginfo_to_metadata.<locals>.<lambda>)�key�Description)r�replace_header�os�pathr
�exists�open�readrr�split_sectionsr)r!�set_payload�dedent_description)�
egg_info_path�pkginfo_path�pkg_info�
requires_path�
requires_file�requires�parsed_requirementsr%�reqsr,�value�descriptionrrr�pkginfo_to_metadataAs.

�
���rAcCsX||}|��}t|t�s*|��D]}|d��|kr)|d�dd��d�}|Sq|S)z<Hack to coax Unicode out of an email Message() - Python 3.3+rr�ascii�surrogateescapezutf-8)�lower�
isinstance�str�	raw_items�encode�decode)r9�field�text�itemrrr�pkginfo_unicode^s
��rMc
Csr|d}d}t|t�sd}t|d�}|��}d�|d��t�d�|dd���df�}|r7|�d��	d	d
�}|S)z@
    Dedent and convert pkg_info['Description'] to Unicode.
    r-FT�
rrN�utf8rBrC)
rErFrM�
splitlinesr
�lstrip�textwrap�dedentrHrI)r9r@�
surrogates�description_lines�description_dedentrrrr6ls$


���r6)
�__doc__�os.pathr/rRr�pkginforrrr)rArMr6rrrr�<module>s

Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY