AlkantarClanX12

Your IP : 18.119.213.36


Current Path : /lib64/python3.6/distutils/__pycache__/
Upload File :
Current File : //lib64/python3.6/distutils/__pycache__/dist.cpython-36.opt-2.pyc

3


 \��@s�ddlZddlZddlZddlmZyddlZWnek
rHdZYnXddlTddlm	Z	m
Z
ddlmZm
Z
mZddlmZddlmZejd�ZGd	d
�d
�ZGdd�d�Zd
d�ZdS)�N)�message_from_file)�*)�FancyGetopt�translate_longopt)�
check_environ�	strtobool�
rfc822_escape)�log)�DEBUGz^[a-zA-Z]([a-zA-Z0-9_]*)$c@sleZdZd}d~dd�d�gZdZd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�gZd=d>�eD�ZddiZd�d?d@�ZdAdB�Z	d�dDdE�Z
dFdG�Zd�dHdI�ZdJdK�Z
dLdM�ZdNdO�ZdPdQ�ZddgfdRdS�ZdTdU�ZdVdW�ZdXdY�ZdZd[�Zd\d]�Zd^d_�Zd�d`da�Zd�dbdc�Zd�dedf�Zejfdgdh�Zdidj�Zdkdl�Zdmdn�Z dodp�Z!dqdr�Z"dsdt�Z#dudv�Z$dwdx�Z%dydz�Z&d{d|�Z'dS)��Distribution�verbose�v�run verbosely (default)��quiet�q�!run quietly (turns verbosity off)�dry-run�n�don't actually do anything�help�h�show detailed help message�no-user-cfgN�-ignore pydistutils.cfg in your home directoryz�Common commands: (see '--help-commands' for more)

  setup.py build      will build the package underneath 'build/'
  setup.py install    will install the package
�
help-commands�list all available commands�name�print package name�version�V�print package version�fullname�print <package name>-<version>�author�print the author's name�author-email� print the author's email address�
maintainer�print the maintainer's name�maintainer-email�$print the maintainer's email address�contact�7print the maintainer's name if known, else the author's�
contact-email�@print the maintainer's email address if known, else the author's�url�print the URL for this package�license� print the license of the package�licence�alias for --license�description�print the package description�long-description�"print the long package description�	platforms�print the list of platforms�classifiers�print the list of classifiers�keywords�print the list of keywords�provides�+print the list of packages/modules provided�requires�+print the list of packages/modules required�	obsoletes�0print the list of packages/modules made obsoletecCsg|]}t|d��qS)r)r)�.0�x�rH�&/usr/lib64/python3.6/distutils/dist.py�
<listcomp>sszDistribution.<listcomp>cCs�d|_d|_d|_x|jD]}t||d�qWt�|_x,|jjD] }d|}t||t|j|��q@Wi|_	d|_
d|_d|_i|_
g|_d|_i|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_i|_i|_|�r8|jd�}|dk	�rH|d=xD|j�D]8\}}|j |�}x"|j�D]\}	}
d|
f||	<�q(W�qWd|k�r�|d|d<|d=d	}t!dk	�r~t!j"|�nt#j$j%|d
�x�|j�D]�\}}
t&|jd|��r�t|jd|�|
�njt&|j|��r�t|j||
�nLt&||��rt|||
�n2dt'|�}t!dk	�r"t!j"|�nt#j$j%|d
��q�Wd
|_(|jdk	�r|x0|jD]&}
|
j)d��sdP|
dk�rRd|_(P�qRW|j*�dS)Nrr�get_��optionszsetup scriptr4r2z:'licence' distribution option is deprecated; use 'license'�
Zset_zUnknown distribution option: %sT�-z
--no-user-cfgF)+r�dry_runr�display_option_names�setattr�DistributionMetadata�metadata�_METHOD_BASENAMES�getattr�cmdclass�command_packages�script_name�script_args�command_optionsZ
dist_files�packagesZpackage_dataZpackage_dir�
py_modules�	libraries�headers�ext_modulesZext_packageZinclude_dirsZ
extra_path�scripts�
data_filesZpassword�command_obj�have_run�get�items�get_option_dict�warnings�warn�sys�stderr�write�hasattr�repr�
want_user_cfg�
startswith�finalize_options)�selfZattrs�attr�basenameZmethod_namerM�commandZcmd_options�opt_dict�opt�val�msg�key�argrHrHrI�__init__zs�






zDistribution.__init__cCs&|jj|�}|dkr"i}|j|<|S)N)r[re)rrru�dictrHrHrIrgszDistribution.get_option_dictrLc	Cs�ddlm}|dkr"t|jj��}|dk	r@|j||�|d}|sV|j|d�dSxt|D]l}|jj|�}|dkr�|j|d|�q\|j|d|�||�}x$|jd�D]}|j|d|�q�Wq\WdS)Nr)�pformatz  zno commands known yetzno option dict for '%s' commandzoption dict for '%s' command:rN)�pprintr~�sortedr[�keys�announcere�split)	rr�header�commands�indentr~Zcmd_namerv�out�linerHrHrI�dump_option_dicts&s&
zDistribution.dump_option_dictscCs�g}t�tjjtjdj�}tjj|d�}tjj|�rB|j	|�tj
dkrRd}nd}|jr�tjjtjjd�|�}tjj|�r�|j	|�d}tjj|�r�|j	|�t
r�|jdd	j|��|S)
N�	distutilsz
distutils.cfg�posixz.pydistutils.cfgzpydistutils.cfg�~z	setup.cfgzusing config files: %sz, )r�os�path�dirnamerj�modules�__file__�join�isfile�appendrro�
expanduserr
r�)rr�filesZsys_dirZsys_fileZ
user_filenameZ	user_fileZ
local_filerHrHrI�find_config_filesBs&



zDistribution.find_config_filescCs�ddlm}tjtjkr8ddddddd	d
ddd
ddg
}ng}t|�}|dkrT|j�}trb|jd�|�}x�|D]�}tr�|jd|�|j	|�xf|j
�D]Z}|j|�}|j|�}x@|D]8}	|	dkr�|	|kr�|j
||	�}
|	jdd�}	||
f||	<q�Wq�W|j�qnWd|jk�r�x�|jdj�D]�\}	\}}
|jj
|	�}yF|�rRt||t|
��n(|	dk�rnt||	t|
��nt||	|
�Wn,tk
�r�}
zt|
��WYdd}
~
XnX�qWdS)Nr)�ConfigParserzinstall-basezinstall-platbasezinstall-libzinstall-platlibzinstall-purelibzinstall-headerszinstall-scriptszinstall-data�prefixzexec-prefix�home�user�rootz"Distribution.parse_config_files():z  reading %s�__name__rO�_�globalrrP)rrP)Zconfigparserr�rjr��base_prefix�	frozensetr�r
r��readZsectionsrMrgre�replacer|r[rf�negative_optrRr�
ValueError�DistutilsOptionError)rr�	filenamesr�Zignore_options�parser�filenameZsectionrMrvrwrx�src�aliasryrHrHrI�parse_config_filesrsJ






zDistribution.parse_config_filescCs�|j�}g|_t||j�}|j|j�|jddi�|j|j|d�}|j	�}t
j|j�|j
|�rhdSx |r�|j||�}|dkrjdSqjW|jr�|j|t|j�dk|jd�dS|js�td��dS)Nr4r2)�args�objectr)�display_optionsr�zno commands suppliedT)�_get_toplevel_optionsr�rr��set_negative_aliasesr�Zset_aliases�getoptrZZget_option_orderr	Z
set_verbosityr�handle_display_options�_parse_command_optsr�
_show_help�len�DistutilsArgError)rrZtoplevel_optionsr�r��option_orderrHrHrI�parse_command_line�s,	

zDistribution.parse_command_linecCs|jdgS)N�command-packages=�0list of packages that provide distutils commands)r�Nr�)�global_options)rrrHrHrIr��sz"Distribution._get_toplevel_optionscCsddlm}|d}tj|�s*td|��|jj|�y|j|�}Wn*tk
rn}zt	|��WYdd}~XnXt
||�s�td|��t|d�o�t
|jt�s�d}t||��|j}t|d�r�|j�}|j|j�t|d�r�t
|jt�r�t|j�}ng}|j|j|j|�|j|�|j|d	d��\}}	t|	d
��rV|	j�rV|j|d|gd�dSt|d��r�t
|jt��r�d}
xP|jD]F\}}}
}t|	|j|���r|d	}
t|��r�|�ntd||f���q|W|
�r�dS|j|�}x&t|	�j�D]\}}d
|f||<�q�W|S)Nr)�Commandzinvalid command name '%s'z&command class %s must subclass Command�user_optionszIcommand class %s must provide 'user_options' attribute (a list of tuples)r��help_optionsrr)r�r�zYinvalid help function %r for help option '%s': must be a callable object (function, etc.)zcommand line) �
distutils.cmdr��
command_re�match�
SystemExitr�r��get_command_class�DistutilsModuleErrorr��
issubclassZDistutilsClassErrorrm�
isinstancer��listr��copy�updater��fix_help_options�set_option_tabler�r�r�rr�Z
get_attr_name�callablerg�varsrf)rrr�r�r�ruZ	cmd_classryr�r�ZoptsZhelp_option_foundZhelp_optionZshortZdesc�funcrvr�valuerHrHrIr��sb










z Distribution._parse_command_optscCsTxNdD]F}t|j|�}|dkr qt|t�rdd�|jd�D�}t|j||�qWdS)Nr>r:cSsg|]}|j��qSrH)�strip)rFZelmrHrHrIrJ_sz1Distribution.finalize_options.<locals>.<listcomp>�,)r>r:)rVrTr��strr�rR)rrrsr�rHrHrIrqUs

zDistribution.finalize_optionsc
Csddlm}ddlm}|rR|r*|j�}n|j}|j|�|j|jd�t	d�|rt|j|j
�|jd
�t	d�x�|jD]z}t|t
�r�t||�r�|}	n
|j|�}	t|	d�r�t|	jt�r�|j|	jt|	j��n|j|	j�|jd	|	j�t	d�q|Wt	||j��dS)Nr)�	gen_usage)r�z
Global options:rLz*Information display options (just display z!information, ignore any commands)r�zOptions for '%s' command:zKInformation display options (just display information, ignore any commands))�distutils.corer�r�r�r�r�r�Z
print_help�common_usage�printr�r�r��typer�r�rmr�r�r�r�r�rY)
rrr�r�r�r�r�r�rMru�klassrHrHrIr�bs6



zDistribution._show_helpc	Cs�ddlm}|jr4|j�td�t||j��dSd}i}x|jD]}d||d<qDWxt|D]l\}}|r^|j|�r^t|�}t	|j
d|��}|dkr�tdj|��n |dkr�td
j|��nt|�d}q^W|S)Nr)r�rLrrKr>r:r�r<r@rBrDrN)r>r:)r<r@rBrD)r�r�Z
help_commands�print_commandsr�rYr�rerrVrTr�)	rrr�r�Zany_display_optionsZis_display_option�optionrwrxr�rHrHrIr��s,z#Distribution.handle_display_optionscCsnt|d�x\|D]T}|jj|�}|s0|j|�}y
|j}Wntk
rRd}YnXtd|||f�qWdS)N�:z(no description available)z
  %-*s  %s)r�rWrer�r6�AttributeError)rrr�r��
max_length�cmdr�r6rHrHrI�print_command_list�s



zDistribution.print_command_listcCs�ddl}|jj}i}x|D]}d||<qWg}x&|jj�D]}|j|�s:|j|�q:Wd}x$||D]}t|�|krdt|�}qdW|j|d|�|r�t	�|j|d|�dS)NrrzStandard commandszExtra commands)
�distutils.commandru�__all__rWr�rer�r�r�r�)rrr��std_commands�is_stdr��extra_commandsr�rHrHrIr��s*

zDistribution.print_commandsc	Cs�ddl}|jj}i}x|D]}d||<qWg}x&|jj�D]}|j|�s:|j|�q:Wg}x\||D]P}|jj|�}|s�|j|�}y
|j}Wnt	k
r�d}YnX|j||f�qdW|S)Nrrz(no description available))
r�rur�rWr�rer�r�r6r�)	rrr�r�r�r�r��rvr�r6rHrHrI�get_command_list�s(	




zDistribution.get_command_listcCsN|j}t|t�sJ|dkrd}dd�|jd�D�}d|krD|jdd�||_|S)NrLcSsg|]}|dkr|j��qS)rL)r�)rFZpkgrHrHrIrJsz5Distribution.get_command_packages.<locals>.<listcomp>r�zdistutils.commandr)rXr�r�r��insert)rrZpkgsrHrHrI�get_command_packagess
z!Distribution.get_command_packagescCs�|jj|�}|r|Sx�|j�D]�}d||f}|}yt|�tj|}Wntk
r^wYnXyt||�}Wn&tk
r�t	d|||f��YnX||j|<|SWt	d|��dS)Nz%s.%sz3invalid command '%s' (no class '%s' in module '%s')zinvalid command '%s')
rWrer��
__import__rjr��ImportErrorrVr�r�)rrrur�ZpkgnameZmodule_nameZ
klass_name�modulerHrHrIr�s(
zDistribution.get_command_classcCsn|jj|�}|rj|rjtr(|jd|�|j|�}||�}|j|<d|j|<|jj|�}|rj|j||�|S)Nz<Distribution.get_command_obj(): creating '%s' command objectr)rcrer
r�r�rdr[�_set_command_options)rrruZcreate�cmd_objr�rMrHrHrI�get_command_objBs


zDistribution.get_command_objc!Csb|j�}|dkr|j|�}tr,|jd|��x.|j�D�] \}\}}tr^|jd|||f�ydd�|jD�}Wntk
r�g}YnXy
|j}Wntk
r�i}YnXy|t|t	�}	||kr�|	r�t
|||t|��nJ||kr�|	r�t
||t|��n,t||��rt
|||�nt
d|||f��Wq8tk
�rX}
zt
|
��WYdd}
~
Xq8Xq8WdS)Nz#  setting options for '%s' command:z    %s = %s (from %s)cSsg|]}t|��qSrH)r)rF�orHrHrIrJqsz5Distribution._set_command_options.<locals>.<listcomp>z1error in %s: command '%s' has no such option '%s')�get_command_namergr
r�rfZboolean_optionsr�r�r�r�rRrrmr�r�)rrrcZoption_dict�command_namer��sourcer�Z	bool_optsZneg_optZ	is_stringryrHrHrIr�]s>	






z!Distribution._set_command_optionsrcCs�ddlm}t||�s&|}|j|�}n|j�}|js8|S|j�d|_d|j|<|j|�|r|x|j	�D]}|j
||�qhW|S)Nr)r�)r�r�r�r�r�Z	finalizedZinitialize_optionsrdr�Zget_sub_commands�reinitialize_command)rrruZreinit_subcommandsr�r��subrHrHrIr��s


z!Distribution.reinitialize_commandcCstj||�dS)N)r	)rrry�levelrHrHrIr��szDistribution.announcecCsx|jD]}|j|�qWdS)N)r��run_command)rrr�rHrHrI�run_commands�szDistribution.run_commandscCsD|jj|�rdStjd|�|j|�}|j�|j�d|j|<dS)Nz
running %sr)rdrer	�infor�Zensure_finalizedZrun)rrrur�rHrHrIr��s	
zDistribution.run_commandcCst|jp|jpg�dkS)Nr)r�r\r])rrrHrHrI�has_pure_modules�szDistribution.has_pure_modulescCs|jot|j�dkS)Nr)r`r�)rrrHrHrI�has_ext_modules�szDistribution.has_ext_modulescCs|jot|j�dkS)Nr)r^r�)rrrHrHrI�has_c_libraries�szDistribution.has_c_librariescCs|j�p|j�S)N)r�r�)rrrHrHrI�has_modules�szDistribution.has_modulescCs|jot|j�dkS)Nr)r_r�)rrrHrHrI�has_headers�szDistribution.has_headerscCs|jot|j�dkS)Nr)rar�)rrrHrHrI�has_scripts�szDistribution.has_scriptscCs|jot|j�dkS)Nr)rbr�)rrrHrHrI�has_data_files�szDistribution.has_data_filescCs|j�o|j�o|j�S)N)r�r�r�)rrrHrHrI�is_pure�s
zDistribution.is_pure)rr
rr)rrr)rrr)rrr)rNr)rNr)rNr)rr r!)r"Nr#)r$Nr%)r&Nr')r(Nr))r*Nr+)r,Nr-)r.Nr/)r0Nr1)r2Nr3)r4Nr5)r6Nr7)r8Nr9)r:Nr;)r<Nr=)r>Nr?)r@NrA)rBNrC)rDNrE)N)NNrL)N)r)N)r)(r��
__module__�__qualname__r�r�r�rQr�r|rgr�r�r�r�r�r�rqr�r�r�r�r�r�r�r�r�r�r	�INFOr�r�r�r�r�r�r�r�r�rrrHrHrHrIrs�

"
0
:C[
1(!"&

,
)
rc@s�eZdZdNZdOdd�Zdd�Zdd�Zdd�Zdd�Zd d!�Z	d"d#�Z
d$d%�Zd&d'�Zd(d)�Z
d*d+�Zd,d-�Zd.d/�Zd0d1�Zd2d3�Zd4d5�ZeZd6d7�Zd8d9�Zd:d;�Zd<d=�Zd>d?�Zd@dA�ZdBdC�ZdDdE�ZdFdG�ZdHdI�ZdJdK�ZdLdM�Z dS)PrSrrr$�author_emailr(�maintainer_emailr0r2r6�long_descriptionr>r:r"r,�
contact_emailr<�download_urlr@rBrDNcCs�|dk	r|jt|��nfd|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_dS)N)�
read_pkg_file�openrrr$rr(rr0r2r6rr>r:r<r	r@rBrD)rrr�rHrHrIr|s&zDistributionMetadata.__init__cst|���fdd�}�fdd�}�d}|d�|_|d�|_|d�|_|d	�|_d|_|d
�|_d|_|d�|_|d�|_	d
�kr�|d
�|_
nd|_
|d�|_|d�|_d�kr�|d�jd�|_
|d�|_|d�|_|dkr�|d�|_|d�|_|d�|_nd|_d|_d|_dS)Ncs�|}|dkrdS|S)N�UNKNOWNrH)rr�)ryrHrI�_read_fieldsz7DistributionMetadata.read_pkg_file.<locals>._read_fieldcs�j|d�}|gkrdS|S)N)Zget_all)r�values)ryrHrI�
_read_list#sz6DistributionMetadata.read_pkg_file.<locals>._read_listzmetadata-versionrrZsummaryr$zauthor-emailz	home-pager2zdownload-urlr6r>r��platformZ
classifierz1.1rBr@rD)rrrr6r$r(rrr0r2r	rr�r>r:r<rBr@rD)rr�filer
rZmetadata_versionrH)ryrIr
s:












z"DistributionMetadata.read_pkg_filec	Cs2ttjj|d�ddd��}|j|�WdQRXdS)NzPKG-INFO�wzUTF-8)�encoding)rr�r�r��write_pkg_file)rrZbase_dirZpkg_inforHrHrI�write_pkg_infoMs
z#DistributionMetadata.write_pkg_infocCsbd}|js"|js"|js"|js"|jr&d}|jd|�|jd|j��|jd|j��|jd|j��|jd|j	��|jd|j
��|jd	|j��|jd
|j��|jr�|jd|j�t
|j��}|jd|�d
j|j��}|�r|jd|�|j|d|j��|j|d|j��|j|d|j��|j|d|j��|j|d|j��dS)Nz1.0z1.1zMetadata-Version: %s
z	Name: %s
zVersion: %s
zSummary: %s
zHome-page: %s
zAuthor: %s
zAuthor-email: %s
zLicense: %s
zDownload-URL: %s
zDescription: %s
r�z
Keywords: %s
ZPlatformZ
ClassifierZRequiresZProvidesZ	Obsoletes)r@rBrDr<r	rl�get_name�get_version�get_description�get_url�get_contact�get_contact_email�get_licenser�get_long_descriptionr��get_keywords�_write_list�
get_platforms�get_classifiers�get_requires�get_provides�
get_obsoletes)rrrrZ	long_descr>rHrHrIrTs0z#DistributionMetadata.write_pkg_filecCs$x|D]}|jd||f�qWdS)Nz%s: %s
)rl)rrrrrr�rHrHrIrvs
z DistributionMetadata._write_listcCs
|jpdS)Nr)r)rrrHrHrIr|szDistributionMetadata.get_namecCs
|jpdS)Nz0.0.0)r)rrrHrHrIrsz DistributionMetadata.get_versioncCsd|j�|j�fS)Nz%s-%s)rr)rrrHrHrI�get_fullname�sz!DistributionMetadata.get_fullnamecCs
|jpdS)Nr)r$)rrrHrHrI�
get_author�szDistributionMetadata.get_authorcCs
|jpdS)Nr)r)rrrHrHrI�get_author_email�sz%DistributionMetadata.get_author_emailcCs
|jpdS)Nr)r()rrrHrHrI�get_maintainer�sz#DistributionMetadata.get_maintainercCs
|jpdS)Nr)r)rrrHrHrI�get_maintainer_email�sz)DistributionMetadata.get_maintainer_emailcCs|jp|jpdS)Nr)r(r$)rrrHrHrIr�sz DistributionMetadata.get_contactcCs|jp|jpdS)Nr)rr)rrrHrHrIr�sz&DistributionMetadata.get_contact_emailcCs
|jpdS)Nr)r0)rrrHrHrIr�szDistributionMetadata.get_urlcCs
|jpdS)Nr)r2)rrrHrHrIr�sz DistributionMetadata.get_licensecCs
|jpdS)Nr)r6)rrrHrHrIr�sz$DistributionMetadata.get_descriptioncCs
|jpdS)Nr)r)rrrHrHrIr�sz)DistributionMetadata.get_long_descriptioncCs
|jpgS)N)r>)rrrHrHrIr�sz!DistributionMetadata.get_keywordscCs|jp
dgS)Nr)r:)rrrHrHrIr �sz"DistributionMetadata.get_platformscCs
|jpgS)N)r<)rrrHrHrIr!�sz$DistributionMetadata.get_classifierscCs
|jpdS)Nr)r	)rrrHrHrI�get_download_url�sz%DistributionMetadata.get_download_urlcCs
|jpgS)N)rB)rrrHrHrIr"�sz!DistributionMetadata.get_requirescCs,ddl}x|D]}|jj|�qW||_dS)Nr)�distutils.versionpredicate�versionpredicate�VersionPredicaterB)rrr�r�r
rHrHrI�set_requires�s
z!DistributionMetadata.set_requirescCs
|jpgS)N)r@)rrrHrHrIr#�sz!DistributionMetadata.get_providescCs:dd�|D�}x |D]}ddl}|jj|�qW||_dS)NcSsg|]}|j��qSrH)r�)rFr
rHrHrIrJ�sz5DistributionMetadata.set_provides.<locals>.<listcomp>r)r+r,Zsplit_provisionr@)rrr�r
r�rHrHrI�set_provides�s

z!DistributionMetadata.set_providescCs
|jpgS)N)rD)rrrHrHrIr$�sz"DistributionMetadata.get_obsoletescCs,ddl}x|D]}|jj|�qW||_dS)Nr)r+r,r-rD)rrr�r�r
rHrHrI�
set_obsoletes�s
z"DistributionMetadata.set_obsoletes)rrr$rr(rr0r2r6rr>r:r"r,rr<r	r@rBrD)N)!r�rrrUr|r
rrrrrr%r&r'r(r)rrrrZget_licencerrrr r!r*r"r.r#r/r$r0rHrHrHrIrS�sF
4"rScCs(g}x|D]}|j|dd��q
W|S)Nr�)r�)rMZnew_optionsZ
help_tuplerHrHrIr��s
r�)rjr��reZemailrrhr�Zdistutils.errorsZdistutils.fancy_getoptrrZdistutils.utilrrrr�r	Zdistutils.debugr
�compiler�rrSr�rHrHrHrI�<module>s0

]Z