HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.10/distutils/__pycache__/dist.cpython-310.opt-2.pyc
o

�i���@s�	ddlZddlZddlZddlmZzddlZWney$dZYnwddlTddlm	Z	m
Z
ddlmZm
Z
mZddlmZddlmZe�d�Zd	d
�ZGdd�d�ZGd
d�d�Zdd�ZdS)�N)�message_from_file)�*)�FancyGetopt�translate_longopt)�
check_environ�	strtobool�
rfc822_escape��log)�DEBUGz^[a-zA-Z]([a-zA-Z0-9_]*)$cCsPt|t�r	|St|t�s&t|�j}d|�d|�d�}t�tj|�t|�}|S)Nz
Warning: 'z' should be a list, got type '�')�
isinstance�str�list�type�__name__r
�WARN)�value�	fieldname�typename�msg�r�+/usr/local/lib/python3.10/distutils/dist.py�_ensure_lists

�
rc@sBeZdZ	gd�ZdZgd�Zdd�eD�ZddiZdHd	d
�Zdd�Z	dIdd�Z
dd�ZdHdd�Zdd�Z
dd�Zdd�Zdd�Zddgfdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�ZdJd+d,�ZdHd-d.�ZdKd0d1�Zejfd2d3�Zd4d5�Zd6d7�Zd8d9�Z d:d;�Z!d<d=�Z"d>d?�Z#d@dA�Z$dBdC�Z%dDdE�Z&dFdG�Z'dS)L�Distribution))�verbose�vzrun verbosely (default)�)�quiet�qz!run quietly (turns verbosity off))zdry-run�nzdon't actually do anything)�help�hzshow detailed help message)zno-user-cfgNz-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
))z
help-commandsNzlist all available commands)�nameNzprint package name)�version�Vzprint package version)�fullnameNzprint <package name>-<version>)�authorNzprint the author's name)�author-emailNz print the author's email address)�
maintainerNzprint the maintainer's name)zmaintainer-emailNz$print the maintainer's email address)�contactNz7print the maintainer's name if known, else the author's)z
contact-emailNz@print the maintainer's email address if known, else the author's)�urlNzprint the URL for this package)�licenseNz print the license of the package)�licenceNzalias for --license)�descriptionNzprint the package description)zlong-descriptionNz"print the long package description)�	platformsNzprint the list of platforms)�classifiersNzprint the list of classifiers)�keywordsNzprint the list of keywords)�providesNz+print the list of packages/modules provided)�requiresNz+print the list of packages/modules required)�	obsoletesNz0print the list of packages/modules made obsoletecCsg|]}t|d��qS�r�r)�.0�xrrr�
<listcomp>�szDistribution.<listcomp>rrNcCsF	d|_d|_d|_|jD]}t||d�q
t�|_|jjD]}d|}t||t|j|��qi|_	d|_
d|_d|_i|_
g|_d|_i|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_i|_i|_|r�|�d�}|dur�|d=|��D]\}}|� |�}|��D]
\}	}
d|
f||	<q�q�d|vr�|d|d<|d=d	}t!dur�t!�"|�nt#j$�%|d
�|��D]<\}}
t&|jd|�r�t|jd|�|
�q�t&|j|�r�t|j||
�q�t&||�r�t|||
�q�dt'|�}t!�"|�q�d
|_(|jdu�r|jD]}
|
�)d��sn|
dk�rd|_(n�q|�*�dS)Nrr�get_��optionszsetup scriptr-r,z:'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_files�password�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_namer<�commandZcmd_options�opt_dict�opt�valr�key�argrrr�__init__�s�


�


�zDistribution.__init__cCs(	|j�|�}|duri}|j|<|S�N)rJrU)rbre�dictrrrrW&s
zDistribution.get_option_dictr;c	Cs�ddlm}|durt|j���}|dur |�||�|d}|s+|�|d�dS|D]4}|j�|�}|durC|�|d|�q-|�|d|�||�}|�d�D]}|�|d|�qUq-dS)Nr)�pformatz  zno commands known yetzno option dict for '%s' commandzoption dict for '%s' command:r=)Zpprintrn�sortedrJ�keys�announcerU�split)	rb�header�commands�indentrnZcmd_namerf�out�linerrr�dump_option_dicts1s.����zDistribution.dump_option_dictscCs�	g}t�tj�tjdj�}tj�|d�}tj�|�r"|�	|�tj
dkr*d}nd}|jrEtj�tj�d�|�}tj�|�rE|�	|�d}tj�|�rR|�	|�t
r^|�dd	�|��|S)
N�	distutilsz
distutils.cfg�posixz.pydistutils.cfgzpydistutils.cfg�~z	setup.cfgzusing config files: %sz, )r�os�path�dirnamerZ�modules�__file__�join�isfile�appendr#r_�
expanduserrrq)rb�filesZsys_dirZsys_fileZ
user_filenameZ	user_fileZ
local_filerrr�find_config_filesMs(



zDistribution.find_config_filescCs|ddlm}tjtjkrgd�}ng}t|�}|dur|��}tr&|�d�|�}|D]D}tr6|�d|�|�	|�|�
�D]+}|�|�}|�|�}|D]}	|	dkri|	|vri|�
||	�}
|	�dd�}	||
f||	<qMq?|��q+d	|jvr�|jd	��D]?\}	\}}
|j�
|	�}z!|r�t||t|
��n|	d
vr�t||	t|
��nt||	|
�Wq|ty�}
zt|
��d}
~
wwdSdS)Nr)�ConfigParser)
zinstall-basezinstall-platbasezinstall-libzinstall-platlibzinstall-purelibzinstall-headerszinstall-scriptszinstall-data�prefixzexec-prefix�home�user�rootz"Distribution.parse_config_files():z  reading %srr>�_�global)rr?)�configparserr�rZr��base_prefix�	frozensetr�rrq�readZsectionsr<rWrU�replacerkrJrV�negative_optrAr�
ValueError�DistutilsOptionError)rb�	filenamesr�Zignore_options�parser�filename�sectionr<rfrgrh�src�aliasrrrr�parse_config_files}sR




��

����zDistribution.parse_config_filescCs�	|��}g|_t||j�}|�|j�|�ddi�|j|j|d�}|�	�}t
�|j�|�
|�r5dS|rE|�||�}|durCdS|s7|jrX|j|t|j�dk|jd�dS|js_td��dS)Nr-r,)�args�objectr��display_optionsrtzno commands suppliedT)�_get_toplevel_optionsrtrr��set_negative_aliasesr�Zset_aliases�getoptrIZget_option_orderr
Z
set_verbosityr�handle_display_options�_parse_command_optsr!�
_show_help�len�DistutilsArgError)rbZtoplevel_optionsr�r��option_orderrrr�parse_command_line�s2	
��zDistribution.parse_command_linecCs	|jdgS)N)zcommand-packages=Nz0list of packages that provide distutils commands)�global_options�rbrrrr��s�z"Distribution._get_toplevel_optionsc
Cs�	ddlm}|d}t�|�std|��|j�|�z|�|�}Wnty3}zt	|��d}~wwt
||�s?td|��t|d�rJt
|jt�sRd}t||��|j}t|d�rd|��}|�|j�t|d�rut
|jt�rut|j�}ng}|�|j|j|�|�|�|�|d	d��\}}	t|	d
�r�|	jr�|j|d|gd�dSt|d�r�t
|jt�r�d}
|jD] \}}}
}t|	|�|��r�d	}
t|�r�|�q�td||f��q�|
r�dS|�|�}t|	���D]
\}}d
|f||<q�|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�zYinvalid help function %r for help option '%s': must be a callable object (function, etc.)zcommand line) �
distutils.cmdr��
command_re�match�
SystemExitrtr��get_command_class�DistutilsModuleErrorr��
issubclassZDistutilsClassErrorr]r
r�rr��copy�updater��fix_help_options�set_option_tabler�r�r�r!r�Z
get_attr_name�callablerW�varsrV)rbr�r�r�reZ	cmd_classrr�r�ZoptsZhelp_option_foundZhelp_optionZshortZdesc�funcrfr#rrrrr�sz	
��
�

�


���


����

z Distribution._parse_command_optscCsR	dD]#}t|j|�}|durqt|t�r&dd�|�d�D�}t|j||�qdS)N�r1r/cS�g|]}|���qSr��strip)r7Zelmrrrr9j�z1Distribution.finalize_options.<locals>.<listcomp>�,)rErCr
rrrrA)rbrcrrrrra`s
��zDistribution.finalize_optionsrc
Cs
	ddlm}ddlm}|r*|r|��}n|j}|�|�|�|jd�t	d�|r;|�|j
�|�d�t	d�|jD]=}t|t
�rMt||�rM|}	n|�|�}	t|	d�rit|	jt�ri|�|	jt|	j��n|�|	j�|�d|	j�t	d�q>t	||j��dS)	Nr��	gen_usager�z
Global options:r;zKInformation display options (just display information, ignore any commands)r�zOptions for '%s' command:)�distutils.corer�r�r�r�r�r��
print_help�common_usage�printr�rtr
rr�r�r]r�rr�r�rrH)
rbr�r�r�rtr�r�r<re�klassrrrr�ms<


�



��
zDistribution._show_helpc	Cs�	ddlm}|jr|��td�t||j��dSd}i}|jD]}d||d<q"|D]6\}}|rc|�|�rct|�}t	|j
d|��}|dvrQtd�|��n|dvr]td	�|��nt|�d}q-|S)
Nrr�r;rr:r�r�)r0r2r3r4r=)r�r�Z
help_commands�print_commandsr�rHr�rUrrErCr�)	rbr�r�Zany_display_optionsZis_display_option�optionrgrhrrrrr��s.
�z#Distribution.handle_display_optionsc	Csj	t|d�|D])}|j�|�}|s|�|�}z|j}Wnty(d}Ynwtd|||f�q	dS)N�:�(no description available)z
  %-*s  %s)r�rFrUr�r.�AttributeError)rbrtrs�
max_length�cmdr�r.rrr�print_command_list�s

��zDistribution.print_command_listcCs�	ddl}|jj}i}|D]}d||<q
g}|j��D]}|�|�s'|�|�qd}||D]}t|�|kr:t|�}q.|�|d|�|rPt	�|�|d|�dSdS)NrrzStandard commandszExtra commands)
�distutils.commandre�__all__rFrprUr�r�r�r�)rbry�std_commands�is_stdr��extra_commandsr�rrrr��s6


�����zDistribution.print_commandsc		Cs�	ddl}|jj}i}|D]}d||<q
g}|j��D]}|�|�s'|�|�qg}||D]'}|j�|�}|s=|�|�}z|j}Wnt	yMd}Ynw|�||f�q.|S)Nrrr�)
r�rer�rFrprUr�r�r.r�)	rbryr�r�r�r��rvr�r.rrr�get_command_list�s.


�

�zDistribution.get_command_listcCsP	|j}t|t�s&|durd}dd�|�d�D�}d|vr#|�dd�||_|S)Nr;cSsg|]
}|dkr|���qS)r;r�)r7Zpkgrrrr9!sz5Distribution.get_command_packages.<locals>.<listcomp>r�zdistutils.commandr)rGr
rrr�insert)rbZpkgsrrr�get_command_packagess
z!Distribution.get_command_packagesc	Cs�	|j�|�}|r|S|��D]?}d||f}|}zt|�tj|}Wn	ty-Yqwzt||�}WntyEt	d|||f��w||j|<|St	d|��)Nz%s.%sz3invalid command '%s' (no class '%s' in module '%s')zinvalid command '%s')
rFrUr��
__import__rZr�ImportErrorrEr�r�)rbrer�Zpkgname�module_nameZ
klass_name�modulerrrr�'s2����
zDistribution.get_command_classcCsn	|j�|�}|s5|r5tr|�d|�|�|�}||�}|j|<d|j|<|j�|�}|r5|�||�|S)Nz<Distribution.get_command_obj(): creating '%s' command objectr)rSrUrrqr�rTrJ�_set_command_options)rbreZcreate�cmd_objr�r<rrr�get_command_objMs�

zDistribution.get_command_objcCsH	|��}|dur|�|�}tr|�d|�|��D]�\}\}}tr-|�d|||f�z
dd�|jD�}WntyBg}Ynwz|j}WntySi}Ynwz=t|t	�}	||vrl|	rlt
|||t|��n$||vr{|	r{t
||t|��nt||�r�t
|||�n	t
d|||f��Wqty�}
zt
|
��d}
~
wwdS)Nz#  setting options for '%s' command:z    %s = %s (from %s)cSsg|]}t|��qSrr6)r7�orrrr9|s�z5Distribution._set_command_options.<locals>.<listcomp>z1error in %s: command '%s' has no such option '%s')�get_command_namerWrrqrVZboolean_optionsr�r�r
rrArr]r�r�)rbrSZoption_dict�command_namer��sourcerZ	bool_optsZneg_optZ	is_stringrrrrr�hsT

�
��
�

������z!Distribution._set_command_optionsrcCs~	ddlm}t||�s|}|�|�}n|��}|js|S|��d|_d|j|<|�|�|r=|�	�D]}|�
||�q4|S)Nrr�)r�r�r
r�r�Z	finalizedZinitialize_optionsrTr�Zget_sub_commands�reinitialize_command)rbreZreinit_subcommandsr�r��subrrrr��s 


z!Distribution.reinitialize_commandcCst�||�dSrlr	)rbr�levelrrrrq��zDistribution.announcecCs	|jD]}|�|�qdSrl)rt�run_command)rbr�rrr�run_commands�s
�zDistribution.run_commandscCsF	|j�|�r	dSt�d|�|�|�}|��|��d|j|<dS)Nz
running %sr)rTrUr
�infor�Zensure_finalized�run)rbrer�rrrr��s
zDistribution.run_commandcCst|jp|jpg�dkS�Nr)r�rKrLr�rrr�has_pure_modules�szDistribution.has_pure_modulescC�|jo	t|j�dkSr�)rOr�r�rrr�has_ext_modules��zDistribution.has_ext_modulescCr�r�)rMr�r�rrr�has_c_libraries�r�zDistribution.has_c_librariescCs|��p|��Srl)r�r�r�rrr�has_modules�r�zDistribution.has_modulescCr�r�)rNr�r�rrr�has_headers�r�zDistribution.has_headerscCr�r�)rPr�r�rrr�has_scripts�r�zDistribution.has_scriptscCr�r�)rQr�r�rrr�has_data_files�r�zDistribution.has_data_filescCs|��o
|��o
|��Srl)r�r�r�r�rrr�is_pure�s
��zDistribution.is_purerl)NNr;)rr5)(r�
__module__�__qualname__r�r�r�r@r�rkrWrxr�r�r�r�r�rar�r�r�r�r�r�r�r�r�r�r
�INFOrqr�r�r�r�r�r�r�r�r�r�rrrrr,sP,


0:C[

�2(!"
&

,)
rc@seZdZ	dZdAdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�ZeZd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1d2�Zd3d4�Zd5d6�Zd7d8�Zd9d:�Z d;d<�Z!d=d>�Z"d?d@�Z#dS)BrB)r#r$r'�author_emailr)�maintainer_emailr+r,r.�long_descriptionr1r/r&r*Z
contact_emailr0�download_urlr2r3r4NcCs�|dur
|�t|��dSd|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_dSrl)�
read_pkg_file�openr#r$r'r�r)r�r+r,r.rr1r/r0rr2r3r4)rbr}rrrrk
s&
zDistributionMetadata.__init__cs	t|���fdd�}�fdd�}�d}|d�|_|d�|_|d�|_|d	�|_d|_|d
�|_d|_|d�|_|d�|_	d
�vrH|d
�|_
nd|_
|d�|_|d�|_d�vra|d��d�|_
|d�|_|d�|_|dkr�|d�|_|d�|_|d�|_dSd|_d|_d|_dS)Ncs�|}|dkr
dS|S�NZUNKNOWNr)r#r�rrr�_read_field(sz7DistributionMetadata.read_pkg_file.<locals>._read_fieldcs��|d�}|gkrdS|Srl)Zget_all)r#�valuesrrr�
_read_list.sz6DistributionMetadata.read_pkg_file.<locals>._read_listzmetadata-versionr#r$Zsummaryr'r(z	home-pager,zdownload-urlr.r1r��platformZ
classifier�1.1r3r2r4)rr#r$r.r'r)r�r�r+r,rrrrr1r/r0r3r2r4)rb�filerrZmetadata_versionrrrr$s<













z"DistributionMetadata.read_pkg_filecCsJ	ttj�|d�ddd��}|�|�Wd�dS1swYdS)NzPKG-INFO�wzUTF-8)�encoding)rr|r}r��write_pkg_file)rb�base_dirZpkg_inforrr�write_pkg_infoXs�"�z#DistributionMetadata.write_pkg_infocCsb	d}|js|js|js|js|jrd}|�d|�|�d|���|�d|���|�d|���|�d|�	��|�d|�
��|�d	|���|�d
|���|jre|�d|j�t
|���}|�d|�d
�|���}|r�|�d|�|�|d|���|�|d|���|�|d|���|�|d|���|�|d|���dS)Nz1.0r
zMetadata-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)r2r3r4r0rr\�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)rbrr$Z	long_descr1rrrr_s8��z#DistributionMetadata.write_pkg_filecCs |D]}|�d||f�qdS)Nz%s: %s
)r\)rbrr#rrrrrr�s�z DistributionMetadata._write_listcC�
|jpdSr)r#r�rrrr��
zDistributionMetadata.get_namecCr )Nz0.0.0)r$r�rrrr�r!z DistributionMetadata.get_versioncCsd|��|��fS)Nz%s-%s)rrr�rrr�get_fullname�r�z!DistributionMetadata.get_fullnamecCr r)r'r�rrr�
get_author�r!zDistributionMetadata.get_authorcCr r)r�r�rrr�get_author_email�r!z%DistributionMetadata.get_author_emailcCr r)r)r�rrr�get_maintainer�r!z#DistributionMetadata.get_maintainercCr r)r�r�rrr�get_maintainer_email�r!z)DistributionMetadata.get_maintainer_emailcC�|jp|jpdSr)r)r'r�rrrr�r�z DistributionMetadata.get_contactcCr'r)r�r�r�rrrr�r�z&DistributionMetadata.get_contact_emailcCr r)r+r�rrrr�r!zDistributionMetadata.get_urlcCr r)r,r�rrrr�r!z DistributionMetadata.get_licensecCr r)r.r�rrrr�r!z$DistributionMetadata.get_descriptioncCr r)rr�rrrr�r!z)DistributionMetadata.get_long_descriptioncC�
|jpgSrl)r1r�rrrr�r!z!DistributionMetadata.get_keywordscC�t|d�|_dS)Nr1)rr1�rbrrrr�set_keywords�r�z!DistributionMetadata.set_keywordscCs|jpdgSr)r/r�rrrr�sz"DistributionMetadata.get_platformscCr))Nr/)rr/r*rrr�
set_platforms�r�z"DistributionMetadata.set_platformscCr(rl)r0r�rrrr�r!z$DistributionMetadata.get_classifierscCr))Nr0)rr0r*rrr�set_classifiers�r�z$DistributionMetadata.set_classifierscCr r)rr�rrr�get_download_url�r!z%DistributionMetadata.get_download_urlcCr(rl)r3r�rrrr�r!z!DistributionMetadata.get_requirescC�,ddl}|D]}|j�|�qt|�|_dSr�)�distutils.versionpredicate�versionpredicate�VersionPredicaterr3�rbrryrrrr�set_requires��z!DistributionMetadata.set_requirescCr(rl)r2r�rrrr�r!z!DistributionMetadata.get_providescCs6dd�|D�}|D]}ddl}|j�|�q	||_dS)NcSr�rr�)r7rrrrr9�r�z5DistributionMetadata.set_provides.<locals>.<listcomp>r)r0r1Zsplit_provisionr2)rbrrryrrr�set_provides�s

z!DistributionMetadata.set_providescCr(rl)r4r�rrrr�r!z"DistributionMetadata.get_obsoletescCr/r�)r0r1r2rr4r3rrr�
set_obsoletes�r5z"DistributionMetadata.set_obsoletesrl)$rr�r�rDrkrrrrrrr"r#r$r%r&rrrrZget_licencerrrr+rr,rr-r.rr4rr6rr7rrrrrB�sF
	4"rBcCs&	g}|D]}|�|dd��q|S)Nr�)r�)r<Znew_optionsZ
help_tuplerrrr��s
r�)rZr|�reZemailrrXr�Zdistutils.errorsZdistutils.fancy_getoptrrZdistutils.utilrrrryr
Zdistutils.debugr�compiler�rrrBr�rrrr�<module>s8�
Zc