Hacked By AnonymousFox

Current Path : /opt/alt/python38/lib/python3.8/site-packages/setuptools/__pycache__/
Upload File :
Current File : //opt/alt/python38/lib/python3.8/site-packages/setuptools/__pycache__/dist.cpython-38.pyc

U

�ReO��@s�dgZddlZddlZddlZddlZddlZddlZddlZddl	Zddl
ZddlZddlZddl
mZddlmZddlmZddlmZddlZddlZddlmZmZmZddlmZdd	lmZdd
lm Z m!Z!ddl
m"Z"ddl#m$Z$dd
l%m&Z&ddl%m'Z'ddl(m)Z)ddl*m+Z+ddl,Z,ddl-Z,ddl,m.Z.ddl/m0Z0ddl1m2Z2ddl3Z3e�rpddl4m5Z5e6d�e6d�dd�Z7dd�Z8e9e9d�dd�Z:de9ee9d �d!d"�Z;de9ee9d �d#d$�Z<de9eee9d �d%d&�Z=dee9d'�d(d)�Z>d*d+�Z?d,d-�Z@d.d/�ZAeBeCfZDd0d1�ZEd2d3�ZFd4d5�ZGd6d7�ZHd8d9�ZId:d;�ZJd<d=�ZKd>d?�ZLd@dA�ZMdBdC�ZNdDdE�ZOdFdG�ZPdHdI�ZQe0ejRjS�ZTGdJd�deT�ZSGdKdL�dLe+�ZUdS)M�Distribution�N)�	strtobool)�DEBUG��translate_longopt)�iglob)�List�Optional�
TYPE_CHECKING)�defaultdict)�message_from_file)�DistutilsOptionError�DistutilsSetupError)�
rfc822_escape)�
StrictVersion)�	packaging)�ordered_set)�unique_everseen�)�SetuptoolsDeprecationWarning)�windows_support)�
get_unpatched)�parse_configuration)�Messagez&setuptools.extern.packaging.specifiersz#setuptools.extern.packaging.versioncCst�dt�t|�S)NzDo not call this function)�warnings�warn�DistDeprecationWarningr)�cls�r��/builddir/build/BUILDROOT/alt-python38-setuptools-58.3.0-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/setuptools/dist.py�_get_unpatched2sr cCs&t|dd�}|dkr"td�}||_|S)N�metadata_version�2.1)�getattrrr!)�self�mvrrr�get_metadata_version7s
r&)�content�returnc
CsJ|��}t|�dkr |d��Sd�|d��t�d�|dd���f�S)zFReverse RFC-822 escaping by removing leading whitespaces from content.rr�
N)�
splitlines�len�lstrip�join�textwrap�dedent)r'�linesrrr�rfc822_unescape?sr1r)�msg�fieldr(cCs||}|dkrdS|S)zRead Message header field.�UNKNOWNNr�r2r3�valuerrr�_read_field_from_msgGsr7cCst||�}|dkr|St|�S)z4Read Message header field and apply rfc822_unescape.N)r7r1r5rrr�_read_field_unescaped_from_msgOs
r8cCs|�|d�}|gkrdS|S)z9Read Message header field and return all results as list.N)�get_all)r2r3�valuesrrr�_read_list_from_msgWsr;)r2r(cCs|����}|dkrdS|S)Nr4)�get_payload�strip)r2r6rrr�_read_payload_from_msg_sr>cCsVt|�}t|d�|_t|d�|_t|d�|_t|d�|_t|d�|_d|_t|d�|_	d|_
t|d�|_t|d	�|_
d
|kr�t|d
�|_nd|_t|d�|_|jdkr�|jtd�kr�t|�|_t|d�|_d
|kr�t|d
��d�|_t|d�|_t|d�|_|jtd�k�r4t|d�|_t|d�|_t|d�|_nd|_d|_d|_t|d�|_dS)z-Reads the metadata values from a file object.zmetadata-version�name�version�summary�authorNzauthor-emailz	home-page�licensezdownload-url�descriptionr"�keywords�,�platform�
classifierz1.1�requires�provides�	obsoleteszlicense-file)rrr!r7r?r@rDrB�
maintainer�author_email�maintainer_email�urlr8rC�download_url�long_descriptionr>�splitrEr;�	platforms�classifiersrIrJrK�
license_files)r$�filer2rrr�
read_pkg_filefs<
rWcCs"d|krt�d�|�dd�}|S)Nr)z1newlines not allowed and will break in the future� )rr�replace)�valrrr�single_line�s
r[c
s�|��}�fdd�}|dt|��|d|���|d|���|dt|����|d|���d}|D]&\}}t||d	�}|d	k	rf|||�qft|�	��}|d
|�|j
r�|d|j
�|j��D]}	|dd
|	�q�d�
|���}
|
r�|d|
�|��D]}|d|�q�|��d|���|��d|���|��d|���|��d|���t|d��rh|d|j�|j�r||d|j�|j�r�|jD]}|d|��q�|��d|j�p�g���d|���d	S)z0Write the PKG-INFO format data to a file object.cs��d||f�dS)Nz%s: %s
)�write)�keyr6�rVrr�write_field�sz#write_pkg_file.<locals>.write_fieldzMetadata-Version�Name�Version�Summaryz	Home-page))�AuthorrB)zAuthor-emailrM)�
MaintainerrL)zMaintainer-emailrNN�LicensezDownload-URLzProject-URLz%s, %srF�Keywords�Platform�
Classifier�Requires�Provides�	Obsoletes�python_requireszRequires-PythonzDescription-Content-TypezProvides-ExtrazLicense-Filez
%s

)r&�str�get_name�get_versionr[�get_description�get_urlr#r�get_licenserP�project_urls�itemsr-�get_keywords�
get_platforms�_write_list�get_classifiers�get_requires�get_provides�
get_obsoletes�hasattrrl�long_description_content_type�provides_extrasrUr\�get_long_description)
r$rVr@r_Zoptional_fieldsr3�attrZattr_valrC�project_urlrErG�extrarr^r�write_pkg_file�sH


r�cCs`ztj�d|�}|jrt�Wn<ttttfk
rZ}ztd||f�|�W5d}~XYnXdS)Nzx=z4%r must be importable 'module:attrs' string (got %r))	�
pkg_resources�
EntryPoint�parse�extras�AssertionError�	TypeError�
ValueError�AttributeErrorr)�distr�r6�ep�errr�check_importable�s
��r�cCsjz(t|ttf�st�d�|�|ks&t�Wn<ttttfk
rd}ztd||f�|�W5d}~XYnXdS)z"Verify that value is a string list�z%%r must be a list of strings (got %r)N)	�
isinstance�list�tupler�r-r�r�r�r�r�r�r6r�rrr�assert_string_list�s
��r�cCsd|}t|||�|D]J}|�|�s2tdd|��|�d�\}}}|r||krtj�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)r��has_contents_forr�
rpartition�	distutils�logr)r�r�r6Zns_packages�nsp�parent�sep�childrrr�	check_nsp�s 
���r�c
CsPztt�t|����Wn2tttfk
rJ}ztd�|�W5d}~XYnXdS)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)	r��	itertools�starmap�_check_extrartr�r�r�rr�rrr�check_extras
s��r�cCs<|�d�\}}}|r*t�|�r*td|��tt�|��dS)N�:zInvalid environment marker: )�	partitionr��invalid_markerrr��parse_requirements)r��reqsr?r��markerrrrr�sr�cCs&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}))r�r6N)�boolr�format)r�r�r6�tmplrrr�assert_boolsr�cCs,|st�|�d�t�dSt|�d���dS)Nz is ignored.z is invalid.)rrrr�r�r�r6rrr�invalid_unless_false$sr�c
Cslz(tt�|��t|ttf�r&td��Wn>ttfk
rf}zd}t|j	||d��|�W5d}~XYnXdS)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}�r��errorN)
r�r�r�r��dict�setr�r�rr��r�r�r6r�r�rrr�check_requirements+s�r�c
CsXztj�|�WnBtjjtfk
rR}zd}t|j||d��|�W5d}~XYnXdS)z.Verify that value is a valid version specifierzF{attr!r} must be a string containing valid version specifiers; {error}r�N)r�
specifiers�SpecifierSet�InvalidSpecifierr�rr�r�rrr�check_specifier9s�r�c
CsBztj�|�Wn,tk
r<}zt|�|�W5d}~XYnXdS)z)Verify that entry_points map is parseableN)r�r��	parse_mapr�rr�rrr�check_entry_pointsDsr�cCst|t�std��dS)Nztest_suite must be a string)r�rmrr�rrr�check_test_suiteLs
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�rr�rtrmr�)r�r�r6�k�vrrr�check_package_dataQs
��

�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�matchr�r�r)r�r�r6�pkgnamerrr�check_packages`s�r�c@s~eZdZdZdd�eejdd�dd�d�ZdZdd	�Z	dUd
d�Z
dd
�Zedd��Z
edd��Zdd�Zdd�Zedd��Zdd�Zdd�Zdd�Zedd��ZdVd d!�Zd"d#�Zd$d%�Zd&d'�ZdWd(d)�ZdXd+d,�Zd-d.�Zd/d0�Zed1d2��Zd3d4�Zd5d6�Z d7d8�Z!d9d:�Z"d;d<�Z#d=d>�Z$d?d@�Z%dAdB�Z&dCdD�Z'dEdF�Z(dGdH�Z)dIdJ�Z*dKdL�Z+dMdN�Z,dOdP�Z-dQdR�Z.dSdT�Z/dS)YraGDistribution 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.
    cCsdS�Nrrrrr�<lambda>��zDistribution.<lambda>cCsdSr�rrrrrr��r�cCsdSr�rrrrrr��r�)r}rsr~�license_filerUNcCsl|rd|ksd|krdSt�t|d����}tjj�|�}|dk	rh|�d�sht�t|d��|_	||_
dS)Nr?r@zPKG-INFO)r��	safe_namerm�lower�working_set�by_key�get�has_metadata�safe_version�_version�
_patched_dist)r$�attrsr]r�rrr�patch_missing_pkg_info�sz#Distribution.patch_missing_pkg_infocs�t�d�}|si�_|pi}g�_|�dd��_��|�|�dg��_|�dg��_t�	d�D]}t
���|jd�q`t
���fdd�|��D����|������jj���j_���dS)N�package_data�src_root�dependency_links�setup_requires�distutils.setup_keywordscs i|]\}}|�jkr||�qSr)�_DISTUTILS_UNSUPPORTED_METADATA��.0r�r��r$rr�
<dictcomp>�s
�z)Distribution.__init__.<locals>.<dictcomp>)r|r��
dist_files�popr�r�r�r�r��iter_entry_points�vars�
setdefaultr?�
_Distribution�__init__rt�_set_metadata_defaults�_normalize_version�_validate_version�metadatar@�_finalize_requires)r$r�Zhave_package_datar�rr�rr��s,


��	
�zDistribution.__init__cCs4|j��D]$\}}t|j��||�||���q
dS)z�
        Fill-in missing metadata fields not supported by distutils.
        Some fields may have been set by other tools (e.g. pbr).
        Those fields (vars(self.metadata)) take precedence to
        supplied attrs.
        N)r�rtr�r�r�r�)r$r��option�defaultrrrr��sz#Distribution._set_metadata_defaultscCsPt|tj�s|dkr|Sttj�|��}||krLd}t�|j	ft
���|S|S)Nz)Normalizing '{version}' to '{normalized}')r��
setuptools�sicrmrr@rarrr��locals)r@�
normalizedr�rrrr��szDistribution._normalize_versionc	Csft|tj�rt|�}|dk	rbztj�|�Wn4tjjtfk
r`t	�
d|�t�|�YSX|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�Numberrmrr@ra�InvalidVersionr�rrr�r�)r@rrrr��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`.
        rlN�extras_requirer�r)
r#rlr�r��keysrRr~�add�_convert_extras_requirements�"_move_install_requirements_markers)r$r�rrrr��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)	r#rr��_tmp_extras_requirertr�r��_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.
        r�r�)r�rm��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Sr��r�r�rrr�
is_simple_req3szFDistribution._move_install_requirements_markers.<locals>.is_simple_req�install_requiresNrr�c3s,|]$\}}|dd�t�j|�D�fVqdS)cSsg|]}t|��qSr)rm)r�r�rrr�
<listcomp>?szMDistribution._move_install_requirements_markers.<locals>.<genexpr>.<listcomp>N)�map�
_clean_reqr�r�rr�	<genexpr>>s�zBDistribution._move_install_requirements_markers.<locals>.<genexpr>)r#r�r�r��filterr��filterfalserrmrr�r�r�r�rtr�)r$rZspec_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�rrrrCszDistribution._clean_reqcCs`|jj}|r|ng}|jj}|r2||kr2|�|�|dkrF|dkrFd}tt|�|���|j_dS)z<Compute names of all license files which should be included.N)zLICEN[CS]E*zCOPYING*zNOTICE*zAUTHORS*)r�rUr�r�r�r�_expand_patterns)r$rU�patternsr�rrr�_finalize_license_filesJs
�z$Distribution._finalize_license_filescCsdd�|D�S)z�
        >>> list(Distribution._expand_patterns(['LICENSE']))
        ['LICENSE']
        >>> list(Distribution._expand_patterns(['setup.cfg', 'LIC*']))
        ['setup.cfg', 'LICENSE']
        css:|]2}tt|��D] }|�d�stj�|�r|VqqdS)�~N)�sortedr�endswith�os�path�isfile)r��patternrrrrres
�z0Distribution._expand_patterns.<locals>.<genexpr>r)r	rrrr]s�zDistribution._expand_patternsc
Cs�ddlm}tjtjkrgnddddddd	d
ddd
ddg
}t|�}|dkrR|��}tr`|�d�|�}t	|_
|D]�}tj|dd��(}tr�|�dj
ft���|�|�W5QRX|��D]d}|�|�}|�|�}	|D]F}
|
dks�|
|kr�q�|�||
�}|�|
|�}
|�|
|�}
||f|	|
<q�q�|��qpd|jk�r8dS|jd��D]�\}
\}}|j�|
�}
|
�rpt|�}n|
dk�r�t|�}zt||
�p�|
|�Wn.tk
�r�}zt|�|�W5d}~XYnX�qFdS)z�
        Adapted from distutils.dist.Distribution.parse_config_files,
        this method provides the same functionality in subtly-improved
        ways.
        r)�ConfigParserz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)�verbose�dry_run)�configparserr�sysr�base_prefix�	frozenset�find_config_filesr�announcerm�optionxform�io�openr�r��	read_file�sections�options�get_option_dictr��warn_dash_deprecation�make_option_lowercaser��command_optionsrt�negative_optr�setattrr�r
)r$�	filenamesr�ignore_options�parser�filename�readerr�r(�opt_dict�optrZ�src�aliasr�rrr�_parse_config_filesmsj
���




z Distribution._parse_config_filescCsd|dkr|S|�dd�}tjj|��}|�d�sF|dkrF||krF|Sd|kr`t�d||f�|S)N)zoptions.extras_requirezoptions.data_files�-�_r(r�zrUsage of dash-separated '%s' will not be supported in future versions. Please use the underscore name '%s' instead)rYr��command�__all__�_setuptools_commands�
startswithrr)r$r5r�Zunderscore_opt�commandsrrrr*�s$�����z"Distribution.warn_dash_deprecationcCs:zt�d�}t|�d��WStjk
r4gYSXdS)Nr��distutils.commands)r��get_distributionr��
get_entry_map�DistributionNotFound)r$r�rrrr=�s

z!Distribution._setuptools_commandscCs4|dks|��r|S|��}t�d|||f�|S)Nr�zlUsage of uppercase key '%s' in '%s' will be deprecated in future versions. Please use lowercase '%s' instead)�islowerr�rr)r$r5r�Z
lowercase_optrrrr+�s��z"Distribution.make_option_lowercasecCs^|��}|dkr|�|�}tr,|�d|�|��D�]"\}\}}trZ|�d|||f�zdd�|jD�}Wntk
r�g}YnXz
|j}Wntk
r�i}YnXz|t|t	�}	||kr�|	r�t
|||t|��nJ||kr�|	r�t
||t|��n,t||��rt
|||�nt
d|||f��Wq4tk
�rV}
zt
|
�|
�W5d}
~
XYq4Xq4dS)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�sz5Distribution._set_command_options.<locals>.<listcomp>z1error in %s: command '%s' has no such option '%s')�get_command_namer)rr"rt�boolean_optionsr�r-r�rmr.rr|r
r�)r$�command_obj�option_dict�command_namer��sourcer6�	bool_opts�neg_opt�	is_stringr�rrr�_set_command_options�s>




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

        )r/)�ignore_option_errorsN)r8rr,r�r
)r$r/rPrrr�parse_config_filess�zDistribution.parse_config_filescCs8tjjt�|�|jdd�}|D]}tjj|dd�q|S)zResolve pre-setup requirementsT)�	installer�replace_conflicting)rY)r�r��resolver��fetch_build_eggr�)r$rIZresolved_distsr�rrr�fetch_build_eggs$s�zDistribution.fetch_build_eggscCsPd}dd�}t�|�}t�|j|�}tdd�|�}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_order8sz/Distribution.finalize_options.<locals>.by_ordercSs|��Sr�)�load)r�rrrr�=r�z/Distribution.finalize_options.<locals>.<lambda>)r]N)r�r�r�r�_removedrr)r$�grouprYZdefined�filteredZloadedr�rrr�finalize_options/s
zDistribution.finalize_optionscCsdh}|j|kS)z�
        When removing an entry point, if metadata is loaded
        from an older version of Setuptools, that removed
        entry point will attempt to be loaded and will fail.
        See #2765 for more details.
        Z
2to3_doctests)r?)r��removedrrrr[As
�zDistribution._removedcCsJt�d�D]:}t||jd�}|dk	r
|j|jd�|��||j|�q
dS)Nr��rR)r�r�r#r?�requirerUrZ)r$r�r6rrr�_finalize_setup_keywordsOs
z%Distribution._finalize_setup_keywordsc	Csvtj�tjd�}tj�|�srt�|�t�|�tj�|d�}t|d��$}|�	d�|�	d�|�	d�W5QRX|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.

)
rrr-�curdir�exists�mkdirrZ	hide_filer%r\)r$Z
egg_cache_dirZreadme_txt_filename�frrr�get_egg_cache_dirVs

��zDistribution.get_egg_cache_dircCsddlm}|||�S)z Fetch an egg needed for buildingr)rU)Zsetuptools.installerrU)r$r�rUrrrrUiszDistribution.fetch_build_eggcCs\||jkr|j|St�d|�}|D]*}|j|jd�|��|j|<}|St�||�S)z(Pluggable version of get_command_class()r@r`N)�cmdclassr�r�rarUrZr��get_command_class)r$r;Zepsr�rirrrrjos

zDistribution.get_command_classcCs:t�d�D]$}|j|jkr
|��}||j|j<q
t�|�S�Nr@)r�r�r?rirTr��print_commands�r$r�rirrrrl|s
zDistribution.print_commandscCs:t�d�D]$}|j|jkr
|��}||j|j<q
t�|�Srk)r�r�r?rirTr��get_command_listrmrrrrn�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)rtr#�
_include_misc)r$r�r�r��includerrrrp�s

zDistribution.includecsf�d�|jr&��fdd�|jD�|_|jrD��fdd�|jD�|_|jrb��fdd�|jD�|_dS)z9Remove packages, modules, and extensions in named packager�cs"g|]}|�kr|���s|�qSr�r>�r��p��package�pfxrrr�s
z0Distribution.exclude_package.<locals>.<listcomp>cs"g|]}|�kr|���s|�qSrrqrrrtrrr�s
cs&g|]}|j�kr|j���s|�qSr)r?r>rrrtrrr�s
�N)�packages�
py_modules�ext_modules)r$rurrtr�exclude_package�s���zDistribution.exclude_packagecCs2|d}|��D]}||ks&|�|�rdSqdS)z<Return true if 'exclude_package(package)' would do somethingr�TN)�iter_distribution_namesr>)r$rurvrsrrrr��szDistribution.has_contents_forc
s�t�t�std|�f��zt||�}Wn0tk
rX}ztd|�|�W5d}~XYnX|dk	rzt|t�szt|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|]}|�kr|�qSrr�r��item�r6rrr�sz.Distribution._exclude_misc.<locals>.<listcomp>�r��sequencerr#r�r.)r$r?r6�oldr�rr�r�
_exclude_misc�s

� �zDistribution._exclude_miscc
s�t|t�std||f��zt||��Wn0tk
rX}ztd|�|�W5d}~XYnX�dkrpt|||�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)r|Nr}csg|]}|�kr|�qSrrr~�r�rrr�sz.Distribution._include_misc.<locals>.<listcomp>r�)r$r?r6r��newrr�rro�s
 
�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)rtr#r�)r$r�r�r��excluderrrr��s

zDistribution.excludecCs,t|t�std|f��tt|j|��dS)Nz.packages: setting must be a list or tuple (%r))r�r�rr�rrz)r$rwrrr�_exclude_packages�s

�zDistribution._exclude_packagesc
Cs�|jj|_|jj|_|d}|�d�}||krf||\}}||=ddl}|�|d�|dd�<|d}q&t�|||�}|�|�}	t	|	dd�r�d|f|�|�d<|dk	r�gS|S)Nr�aliasesTrZcommand_consumes_arguments�command line�args)
�	__class__�global_optionsr-r)�shlexrRr��_parse_command_optsrjr#)
r$r1r�r;r�r6r7r��nargs�	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:r9rr-NzShouldn't be able to get herer)
r,rtrY�get_command_objr-�copy�updater#r�r�)r$�d�cmd�optsr5r6rZZcmdobjrM�neg�posrrr�get_cmdline_optionss(



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����)rwrxryr�r�r?r
)r$�pkgr��extr?Z	buildinforrrr{Es


z$Distribution.iter_distribution_namesc
Cs�ddl}|jrt�||�St|jtj�s4t�||�S|jj�	�dkrPt�||�S|jj}|jj
}|jdkrndppd}|jj}t�|j�
�d|||�|_zt�||�W�St�|j�
�||||�|_XdS)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�utf8�win32r)r)r�
help_commandsr��handle_display_optionsr��stdoutr$�
TextIOWrapperrr��errorsrG�line_buffering�detach)r$�option_orderrrr��newliner�rrrr�Ws6��z#Distribution.handle_display_options)N)N)N)NF)0r�
__module__�__qualname__�__doc__r�rZ
OrderedSetr�r�r�r�r��staticmethodr�r�r�r�r�r�rr
rr8r*r=r+rOrQrVr^r[rbrhrUrjrlrnrprzr�r�ror�r�r�r�r{r�rrrrrmsf4�






O
.




	(c@seZdZdZdS)rzrClass for warning about deprecations in dist in
    setuptools. Not ignored by default, unlike DeprecationWarning.N)rr�r�r�rrrrr|sr)Vr<r$rr�rrr�Z
distutils.logr��distutils.core�
distutils.cmd�distutils.dist�distutils.command�distutils.utilr�distutils.debugr�distutils.fancy_getoptr�globrr�r.�typingrr	r
�collectionsr�emailr�distutils.errorsr
rrZdistutils.versionrZsetuptools.externrrZ setuptools.extern.more_itertoolsrr�rr�Zsetuptools.commandrZsetuptools.monkeyrZsetuptools.configrr��
email.messager�
__import__r r&rmr1r7r8r;r>rWr[r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r��corerr�rrrrr�<module>s�-
>



Hacked By AnonymousFox1.0, Coded By AnonymousFox