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

U

+a_@sdgZddlZddlZddlZddlZddlZddlZddlZddl	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/m0Z0ddl1m2Z2ddl3Z3erpddl4m5Z5e6de6dddZ7ddZ8e9e9dddZ:de9ee9d d!d"Z;de9ee9d d#d$Z<de9eee9d d%d&Z=dee9d'd(d)Z>d*d+Z?d,d-Z@d.d/ZAeBeCfZDd0d1ZEd2d3ZFd4d5ZGd6d7ZHd8d9ZId:d;ZJd<d=ZKd>d?ZLd@dAZMdBdCZNdDdEZOdFdGZPe0ejQjRZSGdHddeSZRGdIdJdJe+ZTdS)KDistributionN)	strtobool)DEBUGtranslate_longopt)iglob)ListOptional
TYPE_CHECKING)defaultdict)message_from_file)DistutilsOptionErrorDistutilsSetupError)
rfc822_escape)
StrictVersion)	packaging)ordered_set)unique_everseen)SetuptoolsDeprecationWarning)windows_support)
get_unpatched)parse_configuration)Messagez&setuptools.extern.packaging.specifiersz#setuptools.extern.packaging.versioncCstdtt|S)NzDo not call this function)warningswarnDistDeprecationWarningr)clsr7/tmp/pip-install-1bd_1mtk/setuptools/setuptools/dist.py_get_unpatched2sr cCs&t|dd}|dkr"td}||_|S)Nmetadata_version2.1)getattrrr!)selfmvrrrget_metadata_version7s
r&)contentreturnc
CsJ|}t|dkr |dSd|dtd|ddfS)zFReverse RFC-822 escaping by removing leading whitespaces from content.rr
N)
splitlineslenlstripjointextwrapdedent)r'linesrrrrfc822_unescape?s
r1r)msgfieldr(cCs||}|dkrdS|S)zRead Message header field.UNKNOWNNrr2r3valuerrr_read_field_from_msgIsr7cCst||}|dkr|St|S)z4Read Message header field and apply rfc822_unescape.N)r7r1r5rrr_read_field_unescaped_from_msgQs
r8cCs||d}|gkrdS|S)z9Read Message header field and return all results as list.N)get_all)r2r3valuesrrr_read_list_from_msgYsr;)r2r(cCs|}|dkrdS|S)Nr4)get_payloadstrip)r2r6rrr_read_payload_from_msgasr>cCsVt|}t|d|_t|d|_t|d|_t|d|_t|d|_d|_t|d|_	d|_
t|d|_t|d	|_
d
|krt|d
|_nd|_t|d|_|jdkr|jtdkrt||_t|d|_d
|krt|d
d|_t|d|_t|d|_|jtdkr4t|d|_t|d|_t|d|_nd|_d|_d|_t|d|_dS)z-Reads the metadata values from a file object.zmetadata-versionnameversionsummaryauthorNzauthor-emailz	home-pagelicensezdownload-urldescriptionr"keywords,platform
classifierz1.1requiresprovides	obsoleteszlicense-file)rrr!r7r?r@rDrB
maintainerauthor_emailmaintainer_emailurlr8rCdownload_urllong_descriptionr>splitrEr;	platformsclassifiersrIrJrK
license_files)r$filer2rrr
read_pkg_filehs<
rWcCs"d|krtd|dd}|S)Nr)z1newlines not allowed and will break in the future )rrreplace)valrrrsingle_lines
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
|	qd
|}
|
r|d|
|D]}|d|q|d||d||d||d|t|drh|d|j|jr||d|j|jr|jD]}|d|q|d|jpgd|d	S)z5Write the PKG-INFO format data to a file object.
    csd||fdS)Nz%s: %s
)write)keyr6rVrrwrite_fieldsz#write_pkg_file.<locals>.write_fieldzMetadata-VersionNameVersionZSummaryz	Home-page))ZAuthorrB)zAuthor-emailrM)Z
MaintainerrL)zMaintainer-emailrNNZLicensezDownload-URLzProject-URLz%s, %srFZKeywordsPlatform
ClassifierRequiresProvides	Obsoletespython_requireszRequires-PythonzDescription-Content-TypezProvides-ExtrazLicense-Filez
%s

)r&strget_nameget_versionr[get_descriptionget_urlr#rget_licenserPproject_urlsitemsr-get_keywords
get_platforms_write_listget_classifiersget_requiresget_provides
get_obsoleteshasattrrglong_description_content_typeprovides_extrasrUr\get_long_description)
r$rVr@r_Zoptional_fieldsr3attrZattr_valrCZproject_urlrErGextrarr^rwrite_pkg_filesN


r}cCs`ztjd|}|jrtWn<ttttfk
rZ}ztd||f|W5d}~XYnXdS)Nzx=z4%r must be importable 'module:attrs' string (got %r))	
pkg_resources
EntryPointparseextrasAssertionError	TypeError
ValueErrorAttributeErrorr)distr{r6eperrrcheck_importablesrcCsjz(t|ttfstd||ks&tWn<ttttfk
rd}ztd||f|W5d}~XYnXdS)z"Verify that value is a string listz%%r must be a list of strings (got %r)N)	
isinstancelisttuplerr-rrrrrr{r6rrrrassert_string_lists
rcCsd|}t||||D]J}||s2tdd||d\}}}|r||krtjd||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)rhas_contents_forr
rpartition	distutilslogr)rr{r6Zns_packagesnspparentsepchildrrr	check_nsps 
rc
CsPzttt|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	itertoolsstarmap_check_extrarorrrrrrrrcheck_extrassrcCs<|d\}}}|r*t|r*td|tt|dS)N:zInvalid environment marker: )	partitionr~invalid_markerrrparse_requirements)r|reqsr?rmarkerrrrrsrcCs&t||kr"d}t|j||ddS)z)Verify that value is True, False, 0, or 1z0{attr!r} must be a boolean value (got {value!r}))r{r6N)boolrformat)rr{r6tmplrrrassert_bool"src
Cslz(tt|t|ttfr&tdWn>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)
rr~rrdictsetrrrrrr{r6rrrrrcheck_requirements)src
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}rN)r
specifiersSpecifierSetInvalidSpecifierrrrrrrrcheck_specifier9src
CsBztj|Wn,tk
r<}zt||W5d}~XYnXdS)z)Verify that entry_points map is parseableN)r~r	parse_maprrrrrrcheck_entry_pointsGsrcCst|tstddS)Nztest_suite must be a string)rrhr)rr{r6rrrcheck_test_suiteOs
rcCsZt|tstd||D]4\}}t|tsBtd||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)rrrrrorhr)rr{r6kvrrrcheck_package_dataTs

rcCs(|D]}td|stjd|qdS)Nz\w+(\.\w+)*z[WARNING: %r not a valid package name; please use only .-separated package names in setup.py)rematchrrr)rr{r6pkgnamerrrcheck_packagescsrc@szeZdZdZddeejdddddZdZdd	Z	dUd
dZ
dd
ZeddZ
eddZddZddZeddZddZddZddZeddZdVd d!Zd"d#Zd$d%Zd&d'ZdWd(d)ZdXd+d,Zd-d.Zd/d0Zd1d2Zd3d4Zd5d6Z d7d8Z!d9d:Z"d;d<Z#d=d>Z$d?d@Z%dAdBZ&dCdDZ'dEdFZ(dGdHZ)dIdJZ*dKdLZ+dMdNZ,dOdPZ-dQdRZ.dSdTZ/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.
    cCsdSNrrrrr<lambda>zDistribution.<lambda>cCsdSrrrrrrrrcCsdSrrrrrrrr)rxrnrylicense_filerUNcCsl|rd|ksd|krdStt|d}tjj|}|dk	rh|dshtt|d|_	||_
dS)Nr?r@zPKG-INFO)r~	safe_namerhlowerworking_setby_keygethas_metadatasafe_version_version
_patched_dist)r$attrsr]rrrrpatch_missing_pkg_infosz#Distribution.patch_missing_pkg_infocstd}|si_|pi}g_|dd_||dg_|dg_t	dD]}t
|jdq`t
fdd|D|jjj_dS)Npackage_datasrc_rootdependency_linkssetup_requiresdistutils.setup_keywordscs i|]\}}|jkr||qSr)_DISTUTILS_UNSUPPORTED_METADATA.0rrr$rr
<dictcomp>s
z)Distribution.__init__.<locals>.<dictcomp>)rwr
dist_filespoprrrrr~iter_entry_pointsvars
setdefaultr?
_Distribution__init__ro_set_metadata_defaults_normalize_version_validate_versionmetadatar@_finalize_requires)r$rZhave_package_datarrrrrs&


zDistribution.__init__cCs4|jD]$\}}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)rrorrrr)r$roptiondefaultrrrrsz#Distribution._set_metadata_defaultscCsPt|tjs|dkr|Sttj|}||krLd}t|j	ft
|S|S)Nz)Normalizing '{version}' to '{normalized}')r
setuptoolssicrhrr@rarrrlocals)r@
normalizedrrrrrszDistribution._normalize_versionc	Csft|tjrt|}|dk	rbztj|Wn4tjjtfk
r`t	
d|t|YSX|S)NzThe 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.)
rnumbersNumberrhrr@raInvalidVersionrrrrr)r@rrrrszDistribution._validate_versioncCsft|ddr|j|j_t|ddrR|jD]$}|dd}|r,|jj|q,||	dS)z
        Set `metadata.python_requires` and fix environment markers
        in `install_requires` and `extras_require`.
        rgNextras_requirerr)
r#rgrrkeysrRryadd_convert_extras_requirements"_move_install_requirements_markers)r$r|rrrrs
zDistribution._finalize_requirescCsht|ddpi}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"]`.
        rN)	r#rr_tmp_extras_requireror~r_suffix_forappend)r$Z
spec_ext_reqssectionrrsuffixrrrrs


z)Distribution._convert_extras_requirementscCs|jrdt|jSdS)ze
        For a requirement, return the 'extras_require' suffix for
        that requirement.
        rr)rrhreqrrrrszDistribution._suffix_forcsdd}tddpd}tt|}t||}t||}ttt|_	|D]}j
dt|j|qPt
fddj
D_dS)	zv
        Move requirements in `install_requires` that are using environment
        markers `extras_require`.
        cSs|jSrrrrrr
is_simple_req0szFDistribution._move_install_requirements_markers.<locals>.is_simple_reqinstall_requiresNrrc3s,|]$\}}|ddtj|DfVqdS)cSsg|]}t|qSr)rh)rrrrr
<listcomp><szMDistribution._move_install_requirements_markers.<locals>.<genexpr>.<listcomp>N)map
_clean_reqrrrr	<genexpr>;szBDistribution._move_install_requirements_markers.<locals>.<genexpr>)r#rr~rfilterrfilterfalserrhrrrrrror)r$rZspec_inst_reqsZ	inst_reqsZsimple_reqsZcomplex_reqsrrrrr&s

z/Distribution._move_install_requirements_markerscCs
d|_|S)zP
        Given a Requirement, remove environment markers and return it.
        Nr)r$rrrrr@szDistribution._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*)rrUrrrr_expand_patterns)r$rUpatternsrrrr_finalize_license_filesGs
z$Distribution._finalize_license_filescCsdd|DS)z
        >>> list(Distribution._expand_patterns(['LICENSE']))
        ['LICENSE']
        >>> list(Distribution._expand_patterns(['setup.cfg', 'LIC*']))
        ['setup.cfg', 'LICENSE']
        css:|]2}tt|D] }|dstj|r|VqqdS)~N)sortedrendswithospathisfile)rpatternrrrrras
z0Distribution._expand_patterns.<locals>.<genexpr>r)rrrrrYszDistribution._expand_patternsc
Csddlm}tjtjkrgnddddddd	d
ddd
ddg
}t|}|dkrR|}tr`|d|}t	|_
|D]}tj|dd(}tr|dj
ft||W5QRX|D]d}||}||}	|D]F}
|
dks|
|krq|||
}||
|}
||
|}
||f|	|
<qq|qpd|jkr8dS|jdD]\}
\}}|j|
}
|
rpt|}n|
dkrt|}zt||
p|
|Wn.tk
r}zt||W5d}~XYnXqFdS)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-dataprefixzexec-prefixhomeuserrootNz"Distribution.parse_config_files():utf-8)encodingz  reading {filename}__name__global)verbosedry_run)configparserr
sysrbase_prefix	frozensetfind_config_filesrannouncerhoptionxformioopenrr	read_filesectionsoptionsget_option_dictrwarn_dash_deprecationmake_option_lowercasercommand_optionsronegative_optrsetattrrr
)r$	filenamesr
ignore_optionsparserfilenamereaderrr opt_dictoptrZsrcaliasrrrr_parse_config_filesjsf




z Distribution._parse_config_filescCsd|dkr|S|dd}tjj|}|dsF|dkrF||krF|Sd|kr`td||f|S)N)zoptions.extras_requirezoptions.data_files-_r rzrUsage of dash-separated '%s' will not be supported in future versions. Please use the underscore name '%s' instead)rYrcommand__all___setuptools_commands
startswithrr)r$r-rZunderscore_optcommandsrrrr"sz"Distribution.warn_dash_deprecationcCs:ztd}t|dWStjk
r4gYSXdS)Nrdistutils.commands)r~get_distributionr
get_entry_mapDistributionNotFound)r$rrrrr5s

z!Distribution._setuptools_commandscCs4|dks|r|S|}td|||f|S)NrzlUsage of uppercase key '%s' in '%s' will be deprecated in future versions. Please use lowercase '%s' instead)islowerrrr)r$r-rZ
lowercase_optrrrr#sz"Distribution.make_option_lowercasecCs^|}|dkr||}tr,|d||D]"\}\}}trZ|d|||fzdd|jD}Wntk
rg}YnXz
|j}Wntk
ri}YnXz|t|t	}	||kr|	rt
|||t|nJ||kr|	rt
||t|n,t||rt
|||nt
d|||fWq4tk
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)rorrrrsz5Distribution._set_command_options.<locals>.<listcomp>z1error in %s: command '%s' has no such option '%s')get_command_namer!rrroboolean_optionsrr%rrhr&rrwr
r)r$command_objoption_dictcommand_namersourcer6	bool_optsneg_opt	is_stringrrrr_set_command_optionssF






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

        )r')ignore_option_errorsN)r0rr$rr)r$r'rHrrrparse_config_filesszDistribution.parse_config_filescCs8tjjt||jdd}|D]}tjj|ddq|S)zResolve pre-setup requirementsT)	installerreplace_conflicting)rY)r~rresolverfetch_build_eggr)r$rIZresolved_distsrrrrfetch_build_eggsszDistribution.fetch_build_eggscCs>d}dd}tddt|}t||dD]}||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|ddS)Norderr)r#)hookrrrby_order#sz/Distribution.finalize_options.<locals>.by_ordercSs|Sr)load)rrrrr%rz/Distribution.finalize_options.<locals>.<lambda>)r]N)rr~rr)r$grouprQepsrrrrfinalize_optionss
zDistribution.finalize_optionscCsJtdD]:}t||jd}|dk	r
|j|jd|||j|q
dS)NrrJ)r~rr#r?requirerMrR)r$rr6rrr_finalize_setup_keywords)s
z%Distribution._finalize_setup_keywordscCs*t|ddr dd|jD|_ng|_dS)Nconvert_2to3_doctestscSsg|]}tj|qSr)rrabspathrprrrr3sz8Distribution._finalize_2to3_doctests.<locals>.<listcomp>)r#rYrrrr_finalize_2to3_doctests0s

z$Distribution._finalize_2to3_doctestsc	Csvtjtjd}tj|srt|t|tj|d}t|d$}|	d|	d|	dW5QRX|S)Nz.eggsz
README.txtwzcThis 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-curdirexistsmkdirrZ	hide_filerr\)r$Z
egg_cache_dirZreadme_txt_filenamefrrrget_egg_cache_dir:s



zDistribution.get_egg_cache_dircCsddlm}|||S)z Fetch an egg needed for buildingr)rM)Zsetuptools.installerrM)r$rrMrrrrMIszDistribution.fetch_build_eggcCs\||jkr|j|Std|}|D]*}|j|jd||j|<}|St||S)z(Pluggable version of get_command_class()r8rVN)cmdclassr~rrWrMrRrget_command_class)r$r3rTrrdrrrreNs

zDistribution.get_command_classcCs:tdD]$}|j|jkr
|}||j|j<q
t|SNr8)r~rr?rdrLrprint_commandsr$rrdrrrrg[s
zDistribution.print_commandscCs:tdD]$}|j|jkr
|}||j|j<q
t|Srf)r~rr?rdrLrget_command_listrhrrrrics
zDistribution.get_command_listcKs@|D]2\}}t|d|d}|r.||q|||qdS)aAdd 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)ror#
_include_misc)r$rrrincluderrrrkks

zDistribution.includecsfd|jr&fdd|jD|_|jrDfdd|jD|_|jrbfdd|jD|_dS)z9Remove packages, modules, and extensions in named packagercs"g|]}|kr|s|qSrr6r[packagepfxrrrs
z0Distribution.exclude_package.<locals>.<listcomp>cs"g|]}|kr|s|qSrrlr[rmrrrs
cs&g|]}|jkr|js|qSr)r?r6r[rmrrrs
N)packages
py_modulesext_modules)r$rnrrmrexclude_packageszDistribution.exclude_packagecCs2|d}|D]}||ks&||rdSqdS)z<Return true if 'exclude_package(package)' would do somethingrTN)iter_distribution_namesr6)r$rnror\rrrrszDistribution.has_contents_forc
sttstd|fzt||}Wn0tk
rX}ztd||W5d}~XYnX|dk	rzt|tszt|dn|rt||fdd|DdS)zAHandle 'exclude()' for list/tuple attrs without a special handlerz(%s: setting must be a list or tuple (%r) %s: No such distribution settingN4: this setting cannot be changed via include/excludecsg|]}|kr|qSrrritemr6rrrsz.Distribution._exclude_misc.<locals>.<listcomp>rsequencerr#rr&)r$r?r6oldrrryr
_exclude_miscs$

zDistribution._exclude_miscc
st|tstd||fzt||Wn0tk
rX}ztd||W5d}~XYnXdkrpt|||n:ttst|dn"fdd|D}t|||dS)zAHandle 'include()' for list/tuple attrs without a special handlerz%s: setting must be a list (%r)ruNrvcsg|]}|kr|qSrrrwr|rrrsz.Distribution._include_misc.<locals>.<listcomp>rz)r$r?r6rnewrr~rrjs(


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)ror#r})r$rrrexcluderrrrs

zDistribution.excludecCs,t|tstd|ftt|j|dS)Nz.packages: setting must be a list or tuple (%r))rr{rrrrs)r$rprrr_exclude_packagess

zDistribution._exclude_packagesc
Cs|jj|_|jj|_|d}|d}||krf||\}}||=ddl}||d|dd<|d}q&t|||}||}	t	|	ddrd|f||d<|dk	rgS|S)NraliasesTrZcommand_consumes_argumentscommand lineargs)
	__class__global_optionsr%r!shlexrRr_parse_command_optsrer#)
r$r)rr3rr.r/rnargs	cmd_classrrrrs"




z Distribution._parse_command_optscCsi}|jD]\}}|D]\}\}}|dkr4q|dd}|dkr||}|j}|t|di|D]\}	}
|
|krv|	}d}qqvtdn|dkrd}||	|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.
        rr2r1rr%NzShouldn't be able to get herer)
r$rorYget_command_objr%copyupdater#rr)r$dcmdoptsr-r.rZZcmdobjrEnegposrrrget_cmdline_optionss(



z Distribution.get_cmdline_optionsccsv|jpdD]
}|Vq
|jpdD]
}|Vq |jp4dD]:}t|trN|\}}n|j}|drj|dd}|Vq6dS)z@Yield all packages, modules, and extension names in distributionrmoduleNi)rprqrrrrr?r)r$pkgrextr?Z	buildinforrrrt*s


z$Distribution.iter_distribution_namesc
Csddl}|jrt||St|jtjs4t||S|jj	dkrPt||S|jj}|jj
}|jdkrndppd}|jj}t|j
d||||_zt||WSt|j
|||||_XdS)zIf 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)rutf8win32r)r)r
help_commandsrhandle_display_optionsrstdoutr
TextIOWrapperrrerrorsrGline_bufferingdetach)r$option_orderrrrnewlinerrrrr<s6z#Distribution.handle_display_options)N)N)N)NF)0r
__module____qualname____doc__rrZ
OrderedSetrrrrrstaticmethodrrrrrrrrrr0r"r5r#rGrIrNrUrXr]rcrMrergrirkrsrr}rjrrrrrtrrrrrrosd4






B
/


	(c@seZdZdZdS)rzrClass for warning about deprecations in dist in
    setuptools. Not ignored by default, unlike DeprecationWarning.N)rrrrrrrrr_sr)Ur4rrrrrrZ
distutils.logrdistutils.core
distutils.cmddistutils.distdistutils.commanddistutils.utilrdistutils.debugrdistutils.fancy_getoptrglobrrr.typingrr	r
collectionsremailrdistutils.errorsr
rrZdistutils.versionrZsetuptools.externrrZ setuptools.extern.more_itertoolsrrrrZsetuptools.commandrZsetuptools.monkeyrZsetuptools.configrr~
email.messager
__import__r r&rhr1r7r8r;r>rWr[r}rrr{rrrrrrrrrrrrcorerrrrrrr<module>s
-
B	u
Back to Directory File Manager