1jvF d dl mZ d dlZd dlZd dlmZ d dlmZ d dlm Z d dl
mZ d dlm
Z
d dlmZ d d lmZ d d
lmZ d dlZd dlZd dlmZ d dlmZ d d
lmZmZ d dlmZm Z d dl!m"Z" ddl#m$Z$m%Z% e&ddddddddg Z'ej( ) d ej* ddd ej* ddd ej* d!dd" ej* d#d$d% ej* d&d'd( f d) Z+d* Z,ej( ) d+ e, d, Z-d- Z.ej( ) d+ e. d. Z/ G d/ d0 Z0 G d1 d2 Z1d3 Z2d>d6Z3d?d@d8Z4dAd=Z5dS )B )annotationsN)message_from_string) Generator)EmailMessage)Parser)EmailPolicy)cleandoc)Path)Mock)Metadata)sic)
rfc822_escaperfc822_unescape)expandsetupcfg)Distribution )
retrieve_fileurls_from_filepackagez0.0.1zFoo Barzfoo@bar.netzLong
descriptionzShort descriptiononetwo)nameversionauthorauthor_emaillong_descriptiondescriptionkeywordscontentresultzJust a single linesingle_line)idz%Multiline
Text
without
extra indents
multilinez,Multiline
With
additional
indentationmultiline_with_indentationz Leading whitespacezLeading whitespaceremove_leading_whitespacez- Leading whitespace
In
Multiline commentz+Leading whitespace
In
Multiline comment#remove_leading_whitespace_multilinec N |p| t t | k sJ d S N)r r r s u/builddir/build/BUILD/cloudlinux-venv-1.0.11/venv/lib/python3.11/site-packages/setuptools/tests/test_core_metadata.pytest_rfc822_unescaper, $ s0 >
g/-2H2H"I"IIIIIII c t } t j t | }d | fd |d fd |g d fd |d
fd |d
ft j d |t d t j d d |d fd |d fd |d ft j d |ddg t j d! d"t dd#d$% fd&t dd#d'( fd)t dd#* fd+t dt d, * fgS )-NzMetadata version 1.0z,Metadata Version 1.0: Short long descriptionzShort long description)r z!Metadata version 1.1: Classifiers)z#Programming Language :: Python :: 3z%Programming Language :: Python :: 3.7z&License :: OSI Approved :: MIT License)classifiersz"Metadata version 1.1: Download URLzhttps://example.com)download_urlz%Metadata Version 1.2: Requires-Pythonz>=3.7)python_requiresz!Metadata Version 1.2: Project-Urlzhttps://example.bar)Foo)project_urlsz"Issue #1578: project_urls not read)reason)marksz3Metadata Version 2.1: Long Description Content Typeztext/x-rst; charset=UTF-8)long_description_content_typeLicenseMIT)licensezLicense multilinez+This is a long license
over multiple linesz$Metadata Version 2.1: Provides Extrafoobar)provides_extraszprovides_extras not readzMissing authorz1.0.0zsnorri@sturluson.name)r r r zMissing author e-mailzSnorri Sturluson)r r r zMissing author and e-mail)r r zBypass normalized versionz1.0.0a) EXAMPLE_BASE_INFO functoolspartialdictpytestparammarkxfailr
)baseparamss r+ __read_test_casesrG F sR D
tT
*
*F
*:F!9
0F
1F2
4F '
/F)> ? ? ?@@@+##; $
BF.I
F
FF
2FE5>222+##+E#FF
4
$)
(
(H
gZ Zr- )r attrsc t | }|j }|j }t j }| | | d | }t | sJ | d | }| | d|j
fd|j fd|j fd|j
fd|j fd|j fd|j fd |j fd
|j fd|j fd|j fd
|j fd|j fd|j fdd fdd fg}|D ]\ } }
|
| |
| k sJ d S )Nr r r r r metadata_versionprovidesr r r0 r platforms obsoletesrequiresr/ r3 c $ t | di S )Nr3 getattrss r+