• File: dist.cpython-37.opt-2.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/opt/alt/python37/lib64/python3.7/distutils/__pycache__/dist.cpython-37.opt-2.pyc
  • Date Modified: 10/26/2026 8:08 PM
  • File size: 24.55 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit
B

YI~d@sddlZddlZddlZddlmZyddlZWnek
rHdZYnXddlTddlm	Z	m
Z
ddlmZm
Z
mZddlmZddlmZedZd	d
ZGdddZGd
ddZddZdS)N)message_from_file)*)FancyGetopttranslate_longopt)
check_environ	strtobool
rfc822_escape)log)DEBUGz^[a-zA-Z]([a-zA-Z0-9_]*)$cCsLt|trn<t|tsHt|j}d|d|d}ttj|t|}|S)Nz
Warning: 'z' should be a list, got type '')
isinstancestrlisttype__name__r	ZWARN)valueZ	fieldnametypenamemsgr3/opt/alt/python37/lib64/python3.7/distutils/dist.py_ensure_lists


rc@sleZdZdddddgZdZddd	d
ddd
ddddddddddddddgZddeDZddiZd`d!d"Zd#d$Z	dad&d'Z
d(d)Zdbd*d+Zd,d-Z
d.d/Zd0d1Zd2d3Zd4d4gfd5d6Zd7d8Zd9d:Zd;d<Zd=d>Zd?d@ZdAdBZdcdCdDZdddEdFZdedHdIZejfdJdKZdLdMZdNdOZdPdQZ dRdSZ!dTdUZ"dVdWZ#dXdYZ$dZd[Z%d\d]Z&d^d_Z'd S)fDistribution)verbosevzrun verbosely (default))quietqz!run quietly (turns verbosity off))zdry-runnzdon't actually do anything)helphzshow detailed help message)zno-user-cfgNz-ignore pydistutils.cfg in your home directoryzCommon 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)versionVzprint package version)fullnameNzprint <package name>-<version>)authorNzprint the author's name)z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|dqS)r)r).0xrrr
<listcomp>szDistribution.<listcomp>rrNcCsld|_d|_d|_x|jD]}t||dqWt|_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|_|r|d}|dk	rH|d=xD|D]8\}}| |}x"|D]\}	}
d|
f||	<q(WqWd|kr|d|d<|d=d	}t!dk	r~t!"|nt#j$%|d
x|D]\}}
t&|jd|rt|jd||
nNt&|j|rt|j||
n0t&||rt|||
ndt'|}t!"|qWd
|_(|jdk	r`x0|jD]&}
|
)dsHP|
dkr6d|_(Pq6W|*dS)Nrrget_optionszsetup scriptr)r(z:'licence' distribution option is deprecated; use 'license'
Zset_zUnknown distribution option: %sT-z
--no-user-cfgF)+rdry_runrdisplay_option_namessetattrDistributionMetadatametadata_METHOD_BASENAMESgetattrcmdclasscommand_packagesscript_namescript_argscommand_optionsZ
dist_filespackagesZpackage_dataZpackage_dir
py_modules	librariesheadersext_modulesZext_packageZinclude_dirsZ
extra_pathscripts
data_filesZpasswordcommand_objhave_rungetitemsget_option_dictwarningswarnsysstderrwritehasattrrepr
want_user_cfg
startswithfinalize_options)selfZattrsattrbasenameZmethod_namer6commandZcmd_optionsopt_dictoptvalrkeyargrrr__init__s~





zDistribution.__init__cCs&|j|}|dkr"i}|j|<|S)N)rDrN)r[r^dictrrrrP&szDistribution.get_option_dictr5c	Csddlm}|dkr"t|j}|dk	r@||||d}|sV||ddSxt|D]l}|j|}|dkr||d|q\||d|||}x$|dD]}||d|qWq\WdS)Nr)pformatz  zno commands known yetzno option dict for '%s' commandzoption dict for '%s' command:r7)ZpprintrfsortedrDkeysannouncerNsplit)	r[headercommandsindentrfZcmd_namer_outlinerrrdump_option_dicts1s&
zDistribution.dump_option_dictscCsg}ttjtjdj}tj|d}tj|rB|	|tj
dkrRd}nd}|jrtjtjd|}tj|r|	|d}tj|r|	|t
r|dd	||S)
N	distutilsz
distutils.cfgposixz.pydistutils.cfgzpydistutils.cfg~z	setup.cfgzusing config files: %sz, )rospathdirnamerSmodules__file__joinisfileappendr rX
expanduserr
ri)r[filesZsys_dirZsys_fileZ
user_filenameZ	user_fileZ
local_filerrrfind_config_filesMs&



zDistribution.find_config_filesc
Csddlm}tjtjkr8ddddddd	d
ddd
ddg
}ng}t|}|dkrT|}trb|d|}x|D]}tr|d||	|xf|
D]Z}||}||}x@|D]8}	|	dkr|	|kr|
||	}
|	dd}	||
f||	<qWqW|qnWd|jkrx|jdD]\}	\}}
|j
|	}yF|rRt||t|
n(|	dkrnt||	t|
nt||	|
Wn,tk
r}
zt|
Wdd}
~
XYnXqWdS)Nr)ConfigParserzinstall-basezinstall-platbasezinstall-libzinstall-platlibzinstall-purelibzinstall-headerszinstall-scriptszinstall-dataprefixzexec-prefixhomeuserrootz"Distribution.parse_config_files():z  reading %srr8_global)rr9)ZconfigparserrrSrbase_prefix	frozensetr~r
rireadZsectionsr6rPrNreplacerdrDrOnegative_optr;r
ValueErrorDistutilsOptionError)r[	filenamesrZignore_optionsparserfilenamesectionr6r_r`rasrcaliasrrrrparse_config_files}sJ






zDistribution.parse_config_filescCs|}g|_t||j}||j|ddi|j|j|d}|	}t
|j|
|rhdSx |r|||}|dkrjdSqjW|jr|j|t|jdk|jddS|jstddS)Nr)r()argsobjectr)display_optionsrlzno commands suppliedT)_get_toplevel_optionsrlrrset_negative_aliasesrZset_aliasesgetoptrCZget_option_orderr	Z
set_verbosityrhandle_display_options_parse_command_optsr
_show_helplenDistutilsArgError)r[Ztoplevel_optionsrroption_orderrrrparse_command_lines,	

zDistribution.parse_command_linecCs|jdgS)N)zcommand-packages=Nz0list of packages that provide distutils commands)global_options)r[rrrrsz"Distribution._get_toplevel_optionsc
Csddlm}|d}t|s*td||j|y||}Wn*tk
rn}zt	|Wdd}~XYnXt
||std|t|drt
|jtsd}t|||j}t|dr|}||jt|drt
|jtrt|j}ng}||j|j|||||d	d\}}	t|	d
rV|	jrV|j|d|gddSt|drt
|jtrd}
xP|jD]F\}}}
}t|	||r|d	}
t|r|ntd||fq|W|
rdS||}x&t|	D]\}}d
|f||<qW|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)rrlzYinvalid help function %r for help option '%s': must be a callable object (function, etc.)zcommand line) 
distutils.cmdr
command_rematch
SystemExitrlr{get_command_classDistutilsModuleErrorr
issubclassZDistutilsClassErrorrVrrrrcopyupdaterfix_help_optionsset_option_tablerrrrrZ
get_attr_namecallablerPvarsrO)r[rrrr^Z	cmd_classrrrZoptsZhelp_option_foundZhelp_optionZshortZdescfuncr_r rrrrrsb










z Distribution._parse_command_optscCsTxNdD]F}t|j|}|dkr qt|trdd|dD}t|j||qWdS)N)r-r+cSsg|]}|qSr)strip)r1Zelmrrrr3jsz1Distribution.finalize_options.<locals>.<listcomp>,)r?r=rr
rjr;)r[r\rrrrrZ`s

zDistribution.finalize_optionsrc
Csddlm}ddlm}|rR|r*|}n|j}||||jdt	d|rt||j
|dt	dx|jD]z}t|t
rt||r|}	n
||}	t|	drt|	jtr||	jt|	jn||	j|d|	jt	dq|Wt	||jdS)	Nr)	gen_usage)rz
Global options:r5zKInformation display options (just display information, ignore any commands)rzOptions for '%s' command:)distutils.corerrrrrr
print_helpcommon_usageprintrrlrrrrrVrrrrrrB)
r[rrrrlrrr6r^klassrrrrms4



zDistribution._show_helpc	Csddlm}|jr4|tdt||jdSd}i}x|jD]}d||d<qDWxt|D]l\}}|r^||r^t|}t	|j
d|}|dkrtd|n |dkrtd	|nt|d}q^W|S)
Nr)rr5rr4)r-r+r)r,r.r/r0r7)rrZ
help_commandsprint_commandsrrBrrNrr?r=ry)	r[rrZany_display_optionsZis_display_optionoptionr`rarrrrrs*z#Distribution.handle_display_optionsc	Csnt|dx\|D]T}|j|}|s0||}y
|j}Wntk
rRd}YnXtd|||fqWdS)N:z(no description available)z
  %-*s  %s)rr@rNrr*AttributeError)r[rlrk
max_lengthcmdrr*rrrprint_command_lists



zDistribution.print_command_listcCsddl}|jj}i}x|D]}d||<qWg}x&|jD]}||s:||q:Wd}x$||D]}t||krdt|}qdW||d||rt	||d|dS)NrrzStandard commandszExtra commands)
distutils.commandr^__all__r@rhrNr{rrr)r[rqstd_commandsis_stdrextra_commandsrrrrrs*

zDistribution.print_commandsc		Csddl}|jj}i}x|D]}d||<qWg}x&|jD]}||s:||q:Wg}x\||D]P}|j|}|s||}y
|j}Wnt	k
rd}YnX|||fqdW|S)Nrrz(no description available))
rr^rr@rhrNr{rr*r)	r[rqrrrrrvrr*rrrget_command_lists(	




zDistribution.get_command_listcCsN|j}t|tsJ|dkrd}dd|dD}d|krD|dd||_|S)Nr5cSsg|]}|dkr|qS)r5)r)r1Zpkgrrrr3!sz5Distribution.get_command_packages.<locals>.<listcomp>rzdistutils.commandr)rArrrjinsert)r[Zpkgsrrrget_command_packagess
z!Distribution.get_command_packagesc	Cs|j|}|r|Sx|D]}d||f}|}yt|tj|}Wntk
r^wYnXyt||}Wn&tk
rt	d|||fYnX||j|<|SWt	d|dS)Nz%s.%sz3invalid command '%s' (no class '%s' in module '%s')zinvalid command '%s')
r@rNr
__import__rSrwImportErrorr?rr)r[r^rZpkgnameZmodule_nameZ
klass_namemodulerrrr's(
zDistribution.get_command_classcCsl|j|}|sh|rhtr&|d|||}||}|j|<d|j|<|j|}|rh||||S)Nz<Distribution.get_command_obj(): creating '%s' command objectr)rLrNr
rirrMrD_set_command_options)r[r^Zcreatecmd_objrr6rrrget_command_objMs

zDistribution.get_command_objcCsb|}|dkr||}tr,|d|x.|D] \}\}}tr^|d|||fydd|jD}Wntk
rg}YnXy
|j}Wntk
ri}YnXy|t|t	}	||kr|	rt
|||t|nJ||kr|	rt
||t|n,t||rt
|||nt
d|||fWq8tk
rX}
zt
|
Wdd}
~
XYq8Xq8WdS)Nz#  setting options for '%s' command:z    %s = %s (from %s)cSsg|]}t|qSr)r)r1orrrr3|sz5Distribution._set_command_options.<locals>.<listcomp>z1error in %s: command '%s' has no such option '%s')get_command_namerPr
rirOZboolean_optionsrrrr
r;rrVrr)r[rLZoption_dictcommand_namersourcerZ	bool_optsZneg_optZ	is_stringrrrrrhs>	






z!Distribution._set_command_optionsrcCsddlm}t||s&|}||}n|}|js8|S|d|_d|j|<|||r|x|	D]}|
||qhW|S)Nr)r)rrrrrZ	finalizedZinitialize_optionsrMrZget_sub_commandsreinitialize_command)r[r^Zreinit_subcommandsrrsubrrrrs


z!Distribution.reinitialize_commandcCst||dS)N)r	)r[rlevelrrrriszDistribution.announcecCsx|jD]}||qWdS)N)rlrun_command)r[rrrrrun_commandsszDistribution.run_commandscCsD|j|rdStd|||}||d|j|<dS)Nz
running %sr)rMrNr	inforZensure_finalizedrun)r[r^rrrrrs	
zDistribution.run_commandcCst|jp|jpgdkS)Nr)rrErF)r[rrrhas_pure_modulesszDistribution.has_pure_modulescCs|jot|jdkS)Nr)rIr)r[rrrhas_ext_modulesszDistribution.has_ext_modulescCs|jot|jdkS)Nr)rGr)r[rrrhas_c_librariesszDistribution.has_c_librariescCs|p|S)N)rr)r[rrrhas_modulesszDistribution.has_modulescCs|jot|jdkS)Nr)rHr)r[rrrhas_headersszDistribution.has_headerscCs|jot|jdkS)Nr)rJr)r[rrrhas_scriptsszDistribution.has_scriptscCs|jot|jdkS)Nr)rKr)r[rrrhas_data_filesszDistribution.has_data_filescCs|o|o|S)N)rrr)r[rrris_pures
zDistribution.is_pure)N)NNr5)N)r)N)r)(r
__module____qualname__rrrr:rrdrPrpr~rrrrrZrrrrrrrrrrr	INFOrirrrrrrrrrrrrrrr,sz

0
:C[
1(!"&

,
)
rc@seZdZdZdAddZddZddZd	d
ZddZd
dZ	ddZ
ddZddZddZ
ddZddZddZddZdd Zd!d"ZeZd#d$Zd%d&Zd'd(Zd)d*Zd+d,Zd-d.Zd/d0Zd1d2Zd3d4Zd5d6Zd7d8Zd9d:Z d;d<Z!d=d>Z"d?d@Z#dS)Br<)r r!r$author_emailr%maintainer_emailr'r(r*long_descriptionr-r+r#r&Z
contact_emailr,download_urlr.r/r0NcCs|dk	r|t|nfd|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_dS)N)
read_pkg_fileopenr r!r$rr%rr'r(r*rr-r+r,rr.r/r0)r[rurrrrd
s&zDistributionMetadata.__init__cst|fdd}fdd}d}|d|_|d|_|d|_|d	|_d|_|d
|_d|_|d|_|d|_	d
kr|d
|_
nd|_
|d|_|d|_dkr|dd|_
|d|_|d|_|dkr|d|_|d|_|d|_nd|_d|_d|_dS)Ncs|}|dkrdS|S)NUNKNOWNr)r r)rrr_read_field(sz7DistributionMetadata.read_pkg_file.<locals>._read_fieldcs|d}|gkrdS|S)N)Zget_all)r values)rrr
_read_list.sz6DistributionMetadata.read_pkg_file.<locals>._read_listzmetadata-versionr r!Zsummaryr$zauthor-emailz	home-pager(zdownload-urlr*r-rplatformZ
classifierz1.1r/r.r0)rr r!r*r$r%rrr'r(rrrjr-r+r,r/r.r0)r[filerrZmetadata_versionr)rrr$s:












z"DistributionMetadata.read_pkg_filec	Cs2ttj|dddd}||WdQRXdS)NzPKG-INFOwzUTF-8)encoding)rrtrurywrite_pkg_file)r[Zbase_dirZpkg_inforrrwrite_pkg_infoXs
z#DistributionMetadata.write_pkg_infocCsbd}|js"|js"|js"|js"|jr&d}|d||d||d||d||d|	|d|
|d	||d
||jr|d|jt
|}|d|d
|}|r|d|||d|||d|||d|||d|||d|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
rz
Keywords: %s
ZPlatformZ
ClassifierZRequiresZProvidesZ	Obsoletes)r.r/r0r,rrUget_nameget_versionget_descriptionget_urlget_contactget_contact_emailget_licenserget_long_descriptionryget_keywords_write_list
get_platformsget_classifiersget_requiresget_provides
get_obsoletes)r[rr!Z	long_descr-rrrr_s0z#DistributionMetadata.write_pkg_filecCs$x|D]}|d||fqWdS)Nz%s: %s
)rU)r[rr rrrrrrs
z DistributionMetadata._write_listcCs
|jpdS)Nr)r )r[rrrrszDistributionMetadata.get_namecCs
|jpdS)Nz0.0.0)r!)r[rrrrsz DistributionMetadata.get_versioncCsd||fS)Nz%s-%s)rr)r[rrrget_fullnamesz!DistributionMetadata.get_fullnamecCs
|jpdS)Nr)r$)r[rrr
get_authorszDistributionMetadata.get_authorcCs
|jpdS)Nr)r)r[rrrget_author_emailsz%DistributionMetadata.get_author_emailcCs
|jpdS)Nr)r%)r[rrrget_maintainersz#DistributionMetadata.get_maintainercCs
|jpdS)Nr)r)r[rrrget_maintainer_emailsz)DistributionMetadata.get_maintainer_emailcCs|jp|jpdS)Nr)r%r$)r[rrrrsz DistributionMetadata.get_contactcCs|jp|jpdS)Nr)rr)r[rrrrsz&DistributionMetadata.get_contact_emailcCs
|jpdS)Nr)r')r[rrrrszDistributionMetadata.get_urlcCs
|jpdS)Nr)r()r[rrrrsz DistributionMetadata.get_licensecCs
|jpdS)Nr)r*)r[rrrrsz$DistributionMetadata.get_descriptioncCs
|jpdS)Nr)r)r[rrrrsz)DistributionMetadata.get_long_descriptioncCs
|jpgS)N)r-)r[rrrrsz!DistributionMetadata.get_keywordscCst|d|_dS)Nr-)rr-)r[rrrrset_keywordssz!DistributionMetadata.set_keywordscCs|jp
dgS)Nr)r+)r[rrrrsz"DistributionMetadata.get_platformscCst|d|_dS)Nr+)rr+)r[rrrr
set_platformssz"DistributionMetadata.set_platformscCs
|jpgS)N)r,)r[rrrrsz$DistributionMetadata.get_classifierscCst|d|_dS)Nr,)rr,)r[rrrrset_classifierssz$DistributionMetadata.set_classifierscCs
|jpdS)Nr)r)r[rrrget_download_urlsz%DistributionMetadata.get_download_urlcCs
|jpgS)N)r/)r[rrrrsz!DistributionMetadata.get_requirescCs0ddl}x|D]}|j|qWt||_dS)Nr)distutils.versionpredicateversionpredicateVersionPredicaterr/)r[rrqrrrrset_requiress
z!DistributionMetadata.set_requirescCs
|jpgS)N)r.)r[rrrrsz!DistributionMetadata.get_providescCs:dd|D}x |D]}ddl}|j|qW||_dS)NcSsg|]}|qSr)r)r1rrrrr3sz5DistributionMetadata.set_provides.<locals>.<listcomp>r)rrZsplit_provisionr.)r[rrrqrrrset_providess

z!DistributionMetadata.set_providescCs
|jpgS)N)r0)r[rrrrsz"DistributionMetadata.get_obsoletescCs0ddl}x|D]}|j|qWt||_dS)Nr)rrrrr0)r[rrqrrrr
set_obsoletess
z"DistributionMetadata.set_obsoletes)N)$rrrr>rdrrrrrrrrrr	r
rrrrZget_licencerrrrrrrr
rrrrrrrrrrrr<sB	
4"r<cCs(g}x|D]}||ddq
W|S)Nr)r{)r6Znew_optionsZ
help_tuplerrrrs
r)rSrtreZemailrrQrZdistutils.errorsZdistutils.fancy_getoptrrZdistutils.utilrrrrqr	Zdistutils.debugr
compilerrrr<rrrrr<module>s2

Zc