HEX
Server: Apache/2.4.65 (Debian)
System: Linux kubikelcreative 5.10.0-35-amd64 #1 SMP Debian 5.10.237-1 (2025-05-19) x86_64
User: www-data (33)
PHP: 8.4.13
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/setuptools/__pycache__/dist.cpython-39.pyc
a

i�5h���@s�dgZddlZddlZddlZddlZddlZddlZddlZddl	Zddl
ZddlZddlm
Z
ddlmZddlmZddlZddlmZddlmZddlmZmZdd	lmZdd
lmZddlmZddlmZd
dl m!Z!ddl"Z"ddl"m#Z#ddl$m%Z%ddl&m'Z'ddl(Z(e)d�e)d�dd�Z*dd�Z+dd�Z,dd�Z-dd�Z.e/e0fZ1dd�Z2d d!�Z3d"d#�Z4d$d%�Z5d&d'�Z6d(d)�Z7d*d+�Z8d,d-�Z9d.d/�Z:d0d1�Z;d2d3�Z<d4d5�Z=e%ej>j?�Z@Gd6d�de@�Z?Gd7d8�d8e!�ZAdS)9�Distribution�N)�	strtobool)�DEBUG��translate_longopt)�defaultdict)�message_from_file)�DistutilsOptionError�DistutilsSetupError)�
rfc822_escape)�
StrictVersion)�	packaging)�ordered_set�)�SetuptoolsDeprecationWarning)�windows_support)�
get_unpatched)�parse_configurationz&setuptools.extern.packaging.specifiersz#setuptools.extern.packaging.versioncCst�dt�t|�S)NzDo not call this function)�warnings�warn�DistDeprecationWarningr)�cls�r�1/usr/lib/python3/dist-packages/setuptools/dist.py�_get_unpatched)srcCs�t|dd�}|dur�|js |jr*td�}nd|jdusT|jdusTt|dd�dusT|jr^td�}n0|js||js||j	s||j
s||jr�td�}ntd�}||_|S)N�metadata_versionz2.1�python_requires�1.2�1.1z1.0)
�getattr�long_description_content_type�provides_extrasr�
maintainer�maintainer_email�project_urls�provides�requires�	obsoletes�classifiers�download_urlr)�selfZmvrrr�get_metadata_version.s*

���
��
r+cs t|���fdd�}�fdd�}t�d�|_|d�|_|d�|_|d�|_|d	�|_d
|_|d�|_d
|_	|d�|_
|d
�|_d�vr�|d�|_nd
|_|d�|_
|d�|_d�vr�|d��d�|_|d�|_|d�|_|jtd�k�r
|d�|_|d�|_|d�|_nd
|_d
|_d
|_d
S)z-Reads the metadata values from a file object.cs�|}|dkrdS|S)NZUNKNOWNr)�name�value��msgrr�_read_fieldHsz"read_pkg_file.<locals>._read_fieldcs��|d�}|gkrdS|S�N)Zget_all)r,�valuesr.rr�
_read_listNsz!read_pkg_file.<locals>._read_listzmetadata-versionr,�versionZsummary�authorNzauthor-emailz	home-page�licensezdownload-url�description�keywords�,�platformZ
classifierrr&r%r')rrrr,r4r7r5r"�author_emailr#Zurlr6r)Zlong_description�splitr8Z	platformsr(r&r%r')r*�filer0r3rr.r�
read_pkg_fileDs:












r>cCs"d|vrt�d�|�dd�}|S)N�
z1newlines not allowed and will break in the future� )rr�replace)�valrrr�single_lineys
rCc
s|��}�fdd�}|dt|��|d|���|d|���|dt|����|d|���|td�kr�|d	|���|d
|�	��n.d}|D]$\}}t
||�}|dur�|||�q�|d
|���|jr�|d|j�|j
��D]}|dd|�q�t|���}	|d|	�d�|���}
|
�r(|d|
�|td�k�rR|��D]}|d|��q>n|��d|���|��d|���|��d|���|��d|���|��d|���t|d��r�|d|j�|j�r�|d|j�|j�r�t|j�D]}|d|��q�dS)z5Write the PKG-INFO format data to a file object.
    cs��d||f�dS)Nz%s: %s
)�write)�keyr-�r=rr�write_field�sz#write_pkg_file.<locals>.write_fieldzMetadata-Version�Name�VersionZSummaryz	Home-pager�Author�Author-email))rJr5)rKr;)Z
Maintainerr")zMaintainer-emailr#NZLicensezDownload-URLzProject-URLz%s, %sZDescriptionr9ZKeywordsZPlatformZ
ClassifierZRequiresZProvidesZ	ObsoletesrzRequires-PythonzDescription-Content-TypezProvides-Extra)r+�strZget_nameZget_versionrCZget_descriptionZget_urlrZget_contactZget_contact_emailrZget_licenser)r$�itemsrZget_long_description�joinZget_keywordsZ
get_platformsZ_write_listZget_classifiersZget_requiresZget_providesZ
get_obsoletes�hasattrrr r!�sorted)
r*r=r4rGZoptional_fieldsZfield�attrZattr_valZproject_urlZ	long_descr8r:�extrarrFr�write_pkg_file�sV


�rScCsbztj�d|�}|jrJ�Wn>ttttfy\}ztd||f�|�WYd}~n
d}~00dS)Nzx=z4%r must be importable 'module:attrs' string (got %r))	�
pkg_resources�
EntryPoint�parseZextras�	TypeError�
ValueError�AttributeError�AssertionErrorr
)�distrQr-�ep�errr�check_importable�s���r^cCslz(t|ttf�sJ�d�|�|ks&J�Wn>ttttfyf}ztd||f�|�WYd}~n
d}~00dS)z"Verify that value is a string list�z%%r must be a list of strings (got %r)N)	�
isinstance�list�tuplerNrWrXrYrZr
�r[rQr-r]rrr�assert_string_list�s
��rdcCsd|}t|||�|D]J}|�|�s2tdd|��|�d�\}}}|r||vrtj�d||�qdS)z(Verify that namespace packages are validz1Distribution contains no modules or packages for znamespace package %r�.z^WARNING: %r is declared as a package namespace, but %r is not: please correct this in setup.pyN)rd�has_contents_forr
�
rpartition�	distutils�logr)r[rQr-Zns_packagesZnsp�parent�sep�childrrr�	check_nsp�s
���rmc
CsRztt�t|����Wn4tttfyL}ztd�|�WYd}~n
d}~00dS)z+Verify that extras_require mapping is validz�'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.N)	ra�	itertools�starmap�_check_extrarMrWrXrYr
rcrrr�check_extras�s��rqcCs<|�d�\}}}|r*t�|�r*td|��tt�|��dS)N�:zInvalid environment marker: )�	partitionrTZinvalid_markerr
ra�parse_requirements)rRZreqsr,rk�markerrrrrpsrpcCs&t|�|kr"d}t|j||d���dS)z)Verify that value is True, False, 0, or 1z0{attr!r} must be a boolean value (got {value!r}))rQr-N)�boolr
�format)r[rQr-�tmplrrr�assert_boolsryc
Csnz(tt�|��t|ttf�r&td��Wn@ttfyh}z$d}t|j	||d��|�WYd}~n
d}~00dS)z9Verify that install_requires is a valid requirements listzUnordered types are not allowedzm{attr!r} must be a string or list of strings containing valid project/version requirement specifiers; {error}�rQ�errorN)
rarTrtr`�dict�setrWrXr
rw�r[rQr-r{rxrrr�check_requirementss���rc
CsVztj�|�Wn@tjjyP}z$d}t|j||d��|�WYd}~n
d}~00dS)z.Verify that value is a valid version specifierzF{attr!r} must be a string containing valid version specifiers; {error}rzN)r
Z
specifiersZSpecifierSetZInvalidSpecifierr
rwr~rrr�check_specifier#s���r�c
CsDztj�|�Wn.ty>}zt|�|�WYd}~n
d}~00dS)z)Verify that entry_points map is parseableN)rTrUZ	parse_maprXr
rcrrr�check_entry_points1sr�cCst|t�std��dS)Nztest_suite must be a string)r`rLr
)r[rQr-rrr�check_test_suite9s
r�cCsZt|t�std�|���|��D]4\}}t|t�sBtd�||���t|d�|�|�q dS)z@Verify that value is a dictionary of package names to glob listszT{!r} must be a dictionary mapping package names to lists of string wildcard patternsz,keys of {!r} dict must be strings (got {!r})zvalues of {!r} dictN)r`r|r
rwrMrLrd)r[rQr-�k�vrrr�check_package_data>s
��
��r�cCs(|D]}t�d|�stj�d|�qdS)Nz\w+(\.\w+)*z[WARNING: %r not a valid package name; please use only .-separated package names in setup.py)�re�matchrhrir)r[rQr-Zpkgnamerrr�check_packagesMs�r�c@s:eZdZdZdeejejd�ZdZdd�Z	dEdd�Z
edd	��Zed
d��Z
dd
�Zdd�Zedd��Zdd�Zdd�ZdFdd�ZdGdd�ZdHdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1d2�Z d3d4�Z!d5d6�Z"d7d8�Z#d9d:�Z$d;d<�Z%d=d>�Z&d?d@�Z'dAdB�Z(dCdD�Z)dS)IraGDistribution with support for tests and package data

    This is an enhanced version of 'distutils.dist.Distribution' that
    effectively adds the following new optional keyword arguments to 'setup()':

     'install_requires' -- a string or sequence of strings specifying project
        versions that the distribution requires when installed, in the format
        used by 'pkg_resources.require()'.  They will be installed
        automatically when the package is installed.  If you wish to use
        packages that are not available in PyPI, or want to give your users an
        alternate download location, you can add a 'find_links' option to the
        '[easy_install]' section of your project's 'setup.cfg' file, and then
        setuptools will scan the listed web pages for links that satisfy the
        requirements.

     'extras_require' -- a dictionary mapping names of optional "extras" to the
        additional requirement(s) that using those extras incurs. For example,
        this::

            extras_require = dict(reST = ["docutils>=0.3", "reSTedit"])

        indicates that the distribution can optionally provide an extra
        capability called "reST", but it can only be used if docutils and
        reSTedit are installed.  If the user installs your package using
        EasyInstall and requests one of your extras, the corresponding
        additional requirements will be installed if needed.

     'test_suite' -- the name of a test suite to run for the 'test' command.
        If the user runs 'python setup.py test', the package will be installed,
        and the named test suite will be run.  The format is the same as
        would be used on a 'unittest.py' command line.  That is, it is the
        dotted name of an object to import and call to generate a test suite.

     'package_data' -- a dictionary mapping package names to lists of filenames
        or globs to use to find data files contained in the named packages.
        If the dictionary has filenames or globs listed under '""' (the empty
        string), those names will be searched for in every package, in addition
        to any names for the specific package.  Data files found using these
        names/globs will be installed along with the package, in the same
        location as the package.  Note that globs are allowed to reference
        the contents of non-package subdirectories, as long as you use '/' as
        a path separator.  (Globs are automatically converted to
        platform-specific paths at runtime.)

    In addition to these new keywords, this class also has several new methods
    for manipulating the distribution's contents.  For example, the 'include()'
    and 'exclude()' methods can be thought of as in-place add and subtract
    commands that add or remove packages, modules, extensions, and so on from
    the distribution.
    N)r r$r!Z
license_filescCsl|rd|vsd|vrdSt�t|d����}tjj�|�}|durh|�d�sht�t|d��|_	||_
dS)Nr,r4zPKG-INFO)rTZ	safe_namerL�lower�working_setZby_key�getZhas_metadataZsafe_versionZ_version�
_patched_dist)r*�attrsrEr[rrr�patch_missing_pkg_info�sz#Distribution.patch_missing_pkg_infocst�d�}|si�_|pi}g�_|�dd��_��|�|�dg��_|�dg��_t�	d�D]}t
���|jd�q`t
���fdd�|��D���j��D]J\}}�jj|fD]}||vr�||}q�q�|r�|�nd}t�j||�q������jj���j_���dS)N�package_data�src_root�dependency_links�setup_requires�distutils.setup_keywordscs i|]\}}|�jvr||�qSr)�_DISTUTILS_UNSUPPORTED_METADATA��.0r�r��r*rr�
<dictcomp>�s
�z)Distribution.__init__.<locals>.<dictcomp>)rOr�Z
dist_files�popr�r�r�r�rT�iter_entry_points�vars�
setdefaultr,�
_Distribution�__init__rMr��metadata�__dict__�setattr�_normalize_version�_validate_versionr4�_finalize_requires)r*r�Zhave_package_datar\�option�default�sourcer-rr�rr��s2

��zDistribution.__init__cCsTt|tj�s|dur|Sttj�|��}||krPd}t�|j	fit
����|S|S)Nz)Normalizing '{version}' to '{normalized}')r`�
setuptools�sicrLr
r4rIrrrw�locals)r4Z
normalizedrxrrrr��szDistribution._normalize_versionc	Csdt|tj�rt|�}|dur`ztj�|�Wn2tjjtfy^t	�
d|�t�|�YS0|S)Nz�The version specified (%r) is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details.)
r`�numbers�NumberrLr
r4rIZInvalidVersionrWrrr�r�)r4rrrr��s��zDistribution._validate_versioncCsft|dd�r|j|j_t|dd�rR|j��D]$}|�d�d}|r,|jj�|�q,|��|�	�dS)z�
        Set `metadata.python_requires` and fix environment markers
        in `install_requires` and `extras_require`.
        rN�extras_requirerrr)
rrr�r��keysr<r!�add�_convert_extras_requirements�"_move_install_requirements_markers)r*rRrrrr��s
zDistribution._finalize_requirescCsht|dd�pi}tt�|_|��D]@\}}|j|t�|�D]"}|�|�}|j||�|�q>q"dS)z�
        Convert requirements in `extras_require` of the form
        `"extra": ["barbazquux; {marker}"]` to
        `"extra:{marker}": ["barbazquux"]`.
        r�N)	rrra�_tmp_extras_requirerMrTrt�_suffix_for�append)r*Z
spec_ext_reqs�sectionr��r�suffixrrrr��s


z)Distribution._convert_extras_requirementscCs|jrdt|j�SdS)ze
        For a requirement, return the 'extras_require' suffix for
        that requirement.
        rrr_)rurL��reqrrrr�szDistribution._suffix_forcs�dd�}t�dd�pd}tt�|��}t||�}t�||�}ttt|���_	|D]}�j
dt|j��|�qPt
�fdd��j
��D���_dS)	zv
        Move requirements in `install_requires` that are using environment
        markers `extras_require`.
        cSs|jSr1�rur�rrr�
is_simple_reqszFDistribution._move_install_requirements_markers.<locals>.is_simple_req�install_requiresNrrrc3s,|]$\}}|dd�t�j|�D�fVqdS)cSsg|]}t|��qSr)rL)r�r�rrr�
<listcomp>%�zMDistribution._move_install_requirements_markers.<locals>.<genexpr>.<listcomp>N)�map�
_clean_reqr�r�rr�	<genexpr>$s�zBDistribution._move_install_requirements_markers.<locals>.<genexpr>)rrarTrt�filterrn�filterfalser�rLr�r�rur�r|rMr�)r*r�Zspec_inst_reqsZ	inst_reqsZsimple_reqsZcomplex_reqsr�rr�rr�s

�z/Distribution._move_install_requirements_markerscCs
d|_|S)zP
        Given a Requirement, remove environment markers and return it.
        Nr�)r*r�rrrr�)szDistribution._clean_reqcCs�ddlm}tjtjkrgngd�}t|�}|dur<|��}trJ|�d�|�}|D]�}t	j
|dd��6}tr�|�djfit����|�
|�Wd�n1s�0Y|��D]X}|�|�}|�|�}	|D]:}
|
d	ks�|
|vr�q�|�||
�}|
�d
d�}
||f|	|
<q�q�|��qTd|jv�r(dS|jd��D]�\}
\}}|j�|
�}
|
�r`t|�}n|
d
v�rrt|�}zt||
�p�|
|�Wn0t�y�}zt|�|�WYd}~n
d}~00�q6dS)z�
        Adapted from distutils.dist.Distribution.parse_config_files,
        this method provides the same functionality in subtly-improved
        ways.
        r)�ConfigParser)
zinstall-basezinstall-platbasezinstall-libzinstall-platlibzinstall-purelibzinstall-headerszinstall-scriptszinstall-data�prefixzexec-prefix�home�user�rootNz"Distribution.parse_config_files():�utf-8)�encodingz  reading {filename}�__name__�-�_�global)�verboseZdry_run)Zconfigparserr��sysr��base_prefix�	frozensetZfind_config_filesr�announce�io�openrwr�Z	read_fileZsections�options�get_option_dictr�rAr��command_optionsrM�negative_optrr�rXr	)r*�	filenamesr�Zignore_options�parser�filename�readerr�r�Zopt_dict�optrB�src�aliasr]rrr�_parse_config_files1sF
(



z Distribution._parse_config_filescCs\|��}|dur|�|�}tr,|�d|�|��D�] \}\}}trZ|�d|||f�zdd�|jD�}Wnty�g}Yn0z
|j}Wnty�i}Yn0z|t|t	�}	||vr�|	r�t
|||t|��nJ||vr�|	r�t
||t|��n,t||��rt
|||�nt
d|||f��Wq4t�yT}
zt
|
�|
�WYd}
~
q4d}
~
00q4dS)a�
        Set the options for 'command_obj' from 'option_dict'.  Basically
        this means copying elements of a dictionary ('option_dict') to
        attributes of an instance ('command').

        'command_obj' must be a Command instance.  If 'option_dict' is not
        supplied, uses the standard option dictionary for this command
        (from 'self.command_options').

        (Adopted from distutils.dist.Distribution._set_command_options)
        Nz#  setting options for '%s' command:z    %s = %s (from %s)cSsg|]}t|��qSrr)r��orrrr��s�z5Distribution._set_command_options.<locals>.<listcomp>z1error in %s: command '%s' has no such option '%s')Zget_command_namer�rr�rMZboolean_optionsrYr�r`rLr�rrOr	rX)r*Zcommand_objZoption_dictZcommand_namer�r�r-Z	bool_opts�neg_optZ	is_stringr]rrr�_set_command_optionsrsF

��




��z!Distribution._set_command_optionsFcCs(|j|d�t||j|d�|��dS)zYParses configuration files from various levels
        and loads configuration.

        )r�)�ignore_option_errorsN)r�rr�r�)r*r�r�rrr�parse_config_files�s
�zDistribution.parse_config_filescCs8tjjt�|�|jdd�}|D]}tjj|dd�q|S)zResolve pre-setup requirementsT)�	installerZreplace_conflicting)rA)rTr��resolvert�fetch_build_eggr�)r*r&Zresolved_distsr[rrr�fetch_build_eggs�s�zDistribution.fetch_build_eggscCs>d}dd�}tdd�t�|��}t||d�D]}||�q,dS)z�
        Allow plugins to apply arbitrary operations to the
        distribution. Each hook may optionally define a 'order'
        to influence the order of execution. Smaller numbers
        go first and the default is 0.
        z(setuptools.finalize_distribution_optionscSst|dd�S)N�orderr)r)�hookrrr�by_order�sz/Distribution.finalize_options.<locals>.by_ordercSs|��Sr1)�load)r]rrr�<lambda>�r�z/Distribution.finalize_options.<locals>.<lambda>)rEN)r�rTr�rP)r*�groupr��epsr\rrr�finalize_options�s
zDistribution.finalize_optionscCsJt�d�D]:}t||jd�}|dur
|j|jd�|��||j|�q
dS)Nr��r�)rTr�rr,�requirer�r�)r*r\r-rrr�_finalize_setup_keywords�s
z%Distribution._finalize_setup_keywordscCs*t|dd�r dd�|jD�|_ng|_dS)N�convert_2to3_doctestscSsg|]}tj�|��qSr)�os�path�abspath�r��prrrr��s�z8Distribution._finalize_2to3_doctests.<locals>.<listcomp>)rr�r�rrr�_finalize_2to3_doctests�s
�
z$Distribution._finalize_2to3_doctestscCs�tj�tjd�}tj�|�s�t�|�t�|�tj�|d�}t|d��.}|�	d�|�	d�|�	d�Wd�n1s|0Y|S)Nz.eggsz
README.txt�wzcThis directory contains eggs that were downloaded by setuptools to build, test, and run plug-ins.

zAThis directory caches those eggs to prevent repeated downloads.

z/However, it is safe to delete this directory.

)
r�r�rN�curdir�exists�mkdirrZ	hide_filer�rD)r*Z
egg_cache_dirZreadme_txt_filename�frrr�get_egg_cache_dir�s



(zDistribution.get_egg_cache_dircCsddlm}|||�S)z Fetch an egg needed for buildingr)r�)Zsetuptools.installerr�)r*r�r�rrrr��szDistribution.fetch_build_eggcCs\||jvr|j|St�d|�}|D]*}|j|jd�|��|j|<}|St�||�S)z(Pluggable version of get_command_class()�distutils.commandsr�N)�cmdclassrTr�r�r�r�r��get_command_class)r*�commandr�r\rrrrr�s

zDistribution.get_command_classcCs:t�d�D]$}|j|jvr
|��}||j|j<q
t�|�S�Nr)rTr�r,rr�r��print_commands�r*r\rrrrr�s
zDistribution.print_commandscCs:t�d�D]$}|j|jvr
|��}||j|j<q
t�|�Sr)rTr�r,rr�r��get_command_listr	rrrr
s
zDistribution.get_command_listcKs@|��D]2\}}t|d|d�}|r.||�q|�||�qdS)a�Add items to distribution that are named in keyword arguments

        For example, 'dist.include(py_modules=["x"])' would add 'x' to
        the distribution's 'py_modules' attribute, if it was not already
        there.

        Currently, this method only supports inclusion for attributes that are
        lists or tuples.  If you need to add support for adding to other
        attributes in this or a subclass, you can add an '_include_X' method,
        where 'X' is the name of the attribute.  The method will be called with
        the value passed to 'include()'.  So, 'dist.include(foo={"bar":"baz"})'
        will try to call 'dist._include_foo({"bar":"baz"})', which can then
        handle whatever special inclusion logic is needed.
        Z	_include_N)rMr�
_include_misc)r*r�r�r��includerrrrs

zDistribution.includecsf�d�|jr&��fdd�|jD�|_|jrD��fdd�|jD�|_|jrb��fdd�|jD�|_dS)z9Remove packages, modules, and extensions in named packagerecs"g|]}|�kr|���s|�qSr��
startswithr���package�pfxrrr�#s�z0Distribution.exclude_package.<locals>.<listcomp>cs"g|]}|�kr|���s|�qSrr
r�rrrr�)s�cs&g|]}|j�kr|j���s|�qSr)r,rr�rrrr�/s�N)�packages�
py_modules�ext_modules)r*rrrr�exclude_packages���zDistribution.exclude_packagecCs2|d}|��D]}||ks&|�|�rdSqdS)z<Return true if 'exclude_package(package)' would do somethingreTN)�iter_distribution_namesr)r*rrr�rrrrf4szDistribution.has_contents_forc
s�t�t�std|�f��zt||�}Wn2tyZ}ztd|�|�WYd}~n
d}~00|dur|t|t�s|t|d��n|r�t||�fdd�|D��dS)zAHandle 'exclude()' for list/tuple attrs without a special handlerz(%s: setting must be a list or tuple (%r)� %s: No such distribution settingN�4: this setting cannot be changed via include/excludecsg|]}|�vr|�qSrr�r��item�r-rrr�Nr�z.Distribution._exclude_misc.<locals>.<listcomp>�r`�sequencer
rrYr�)r*r,r-�oldr]rrr�
_exclude_misc=s$

����zDistribution._exclude_miscc
s�t|t�std||f��zt||��Wn2tyZ}ztd|�|�WYd}~n
d}~00�durrt|||�n:t�t�s�t|d��n"�fdd�|D�}t||�|�dS)zAHandle 'include()' for list/tuple attrs without a special handlerz%s: setting must be a list (%r)rNrcsg|]}|�vr|�qSrrr�rrrr�dr�z.Distribution._include_misc.<locals>.<listcomp>r)r*r,r-r]�newrr rrPs(

���
�zDistribution._include_misccKs@|��D]2\}}t|d|d�}|r.||�q|�||�qdS)aRemove items from distribution that are named in keyword arguments

        For example, 'dist.exclude(py_modules=["x"])' would remove 'x' from
        the distribution's 'py_modules' attribute.  Excluding packages uses
        the 'exclude_package()' method, so all of the package's contained
        packages, modules, and extensions are also excluded.

        Currently, this method only supports exclusion from attributes that are
        lists or tuples.  If you need to add support for excluding from other
        attributes in this or a subclass, you can add an '_exclude_X' method,
        where 'X' is the name of the attribute.  The method will be called with
        the value passed to 'exclude()'.  So, 'dist.exclude(foo={"bar":"baz"})'
        will try to call 'dist._exclude_foo({"bar":"baz"})', which can then
        handle whatever special exclusion logic is needed.
        Z	_exclude_N)rMrr)r*r�r�r��excluderrrr"gs

zDistribution.excludecCs,t|t�std|f��tt|j|��dS)Nz.packages: setting must be a list or tuple (%r))r`rr
rar�r)r*rrrr�_exclude_packages~s

�zDistribution._exclude_packagesc
Cs�|jj|_|jj|_|d}|�d�}||vrf||\}}||=ddl}|�|d�|dd�<|d}q&t�|||�}|�|�}	t	|	dd�r�d|f|�|�d<|dur�gS|S)Nr�aliasesTrZcommand_consumes_arguments�command line�args)
�	__class__Zglobal_optionsr�r��shlexr<r��_parse_command_optsrr)
r*r�r&rr$r�r�r(�nargsZ	cmd_classrrrr)�s"




z Distribution._parse_command_optscCs�i}|j��D]�\}}|��D]�\}\}}|dkr4q|�dd�}|dkr�|�|�}|j��}|�t|di��|��D]\}	}
|
|krv|	}d}q�qvtd��n|dkr�d}||�	|i�|<qq|S)	ahReturn a '{cmd: {opt:val}}' map of all command-line options

        Option names are all long, but do not include the leading '--', and
        contain dashes rather than underscores.  If the option doesn't take
        an argument (e.g. '--quiet'), the 'val' is 'None'.

        Note that options provided by config files are intentionally excluded.
        r%r�r�rr�NzShouldn't be able to get herer)
r�rMrAZget_command_objr��copy�updaterrZr�)r*�d�cmdZoptsr�r�rBZcmdobjr��neg�posrrr�get_cmdline_options�s(



z Distribution.get_cmdline_optionsccsv|jpdD]
}|Vq
|jpdD]
}|Vq |jp4dD]:}t|t�rN|\}}n|j}|�d�rj|dd�}|Vq6dS)z@Yield all packages, modules, and extension names in distributionr�moduleNi����)rrrr`rbr,�endswith)r*�pkgr2Zextr,Z	buildinforrrr�s


z$Distribution.iter_distribution_namesc
Cs�ddl}|jrt�||�St|jtj�s4t�||�S|jj�	�dvrPt�||�S|jj}|jj
}|jdkrndppd}|jj}t�|j�
�d|||�|_z(t�||�Wt�|j�
�||||�|_St�|j�
�||||�|_0dS)z�If there were any non-global "display-only" options
        (--help-commands or the metadata display options) on the command
        line, display the requested info and return true; else return
        false.
        rN)r��utf8Zwin32r?r�)r�Z
help_commandsr��handle_display_optionsr`�stdoutr��
TextIOWrapperr�r��errorsr:�line_buffering�detach)r*Zoption_orderr�r�r9�newliner:rrrr6�s2�����z#Distribution.handle_display_options)N)N)N)NF)*r��
__module__�__qualname__�__doc__r|rZ
OrderedSetr�r�r�r��staticmethodr�r�r�r�r�r�r�r�r�r�r�r�r�r�rr�rrr
rrrfrrr"r#r)r1rr6rrrrrYsT4�
"



A
/


	(c@seZdZdZdS)rzrClass for warning about deprecations in dist in
    setuptools. Not ignored by default, unlike DeprecationWarning.N)r�r=r>r?rrrrr�sr)B�__all__r�r�r�r�rr�Z
distutils.logrhZdistutils.coreZ
distutils.cmdZdistutils.distZdistutils.utilrZdistutils.debugrZdistutils.fancy_getoptrrn�collectionsrZemailrZdistutils.errorsr	r
rZdistutils.versionrZsetuptools.externr
rr_rr�rZsetuptools.monkeyrZsetuptools.configrrT�
__import__rr+r>rCrSrbrarr^rdrmrqrpryrr�r�r�r�r�Zcorerr�rrrrr�<module>sn5
H	(