/opt/alt/python-internal/lib64/python3.11/distutils/__pycache__
Edit: /opt/alt/python-internal/lib64/python3.11/distutils/__pycache__/cmd.cpython-311.pyc (18803B)
§
šíźIl‡ã óp — d Z ddlZddlZddlZddlmZ ddlmZmZm Z m
Z
mZ ddlmZ G d„ d¦ « Z
dS )ztdistutils.cmd
Provides the Command class, the base class for the command classes
in the distutils.command package.
é N)ÚDistutilsOptionError)ÚutilÚdir_utilÚ file_utilÚarchive_utilÚdep_util©Úlogc óø — e Zd ZdZg Zd„ Zd„ Zd„ Zd„ Zd„ Z d%d „Z
d
„ Zd&d„Zd
„ Z
d'd„Zd'd„Zd„ Z d'd„Zd„ Zd„ Zd„ Zd„ Zd&d„Zd(d„Zd„ Zd„ Zd„ Zd)d„Zd*d„Z d+d„Z d,d „Zd&d!„Zd-d"„Z d.d#„Z! d/d$„Z"dS )0ÚCommanda} Abstract base class for defining command classes, the "worker bees"
of the Distutils. A useful analogy for command classes is to think of
them as subroutines with local variables called "options". The options
are "declared" in 'initialize_options()' and "defined" (given their
final values, aka "finalized") in 'finalize_options()', both of which
must be defined by every command class. The distinction between the
two is necessary because option values might come from the outside
world (command line, config file, ...), and any options dependent on
other options must be computed *after* these outside influences have
been processed -- hence 'finalize_options()'. The "body" of the
subroutine, where it does all its work based on the values of its
options, is the 'run()' method, which must also be implemented by every
command class.
c ó — ddl m} t ||¦ « st d¦ « ‚| j t
u rt
d¦ « ‚|| _ | ¦ « d| _ |j
| _
d| _ d| _ d| _
dS )zÞCreate and initialize a new Command object. Most importantly,
invokes the 'initialize_options()' method, which is the real
initializer and depends on the actual command being
instantiated.
r )ÚDistributionz$dist must be a Distribution instancezCommand is an abstract classN)Údistutils.distr Ú
isinstanceÚ TypeErrorÚ __class__r ÚRuntimeErrorÚdistributionÚinitialize_optionsÚ_dry_runÚverboseÚforceÚhelpÚ finalized)ÚselfÚdistr s ú:/opt/alt/python-internal/lib64/python3.11/distutils/cmd.pyÚ__init__zCommand.__init__/ s¡ € ð 0Ð/Ð/Ð/Ð/Ð/å˜$ Ñ-Ô-ð DÝÐBÑCÔCÐCØŒ>�WÐ$Ð$ÝÐ=Ñ>Ô>Ð>à ˆÔØ×ÒÑ!Ô!Ð!𠈌
ð ”|ˆŒð ˆŒ
𠈌 𠈌ˆˆó c ó„ — |dk r,t | d|z ¦ « }|€t | j |¦ « S |S t |¦ « ‚)NÚdry_runÚ_)Úgetattrr ÚAttributeError)r ÚattrÚmyvals r Ú__getattr__zCommand.__getattr___ sK € Ø�9ÒÐݘD #¨¡*Ñ-Ô-ˆE؈}ݘtÔ0°$Ñ7Ô7Ð7à�å Ñ&Ô&Ð&r c óJ — | j s| ¦ « d| _ d S ©Né )r Úfinalize_options©r s r Úensure_finalizedzCommand.ensure_finalizedi s) € ØŒ~ð $Ø×!Ò!Ñ#Ô#Ð#؈Œˆˆr c ó0 — t d| j z ¦ « ‚)aÙ Set default values for all the options that this command
supports. Note that these defaults may be overridden by other
commands, by the setup script, by config files, or by the
command-line. Thus, this is not the place to code dependencies
between options; generally, 'initialize_options()' implementations
are just a bunch of "self.foo = None" assignments.
This method must be implemented by all command classes.
ú,abstract method -- subclass %s must override©r r r, s r r zCommand.initialize_options{ ó# € õ ÐIØ!œ^ñ,ñ -ô -ð -r c ó0 — t d| j z ¦ « ‚)a Set final values for all the options that this command supports.
This is always called as late as possible, ie. after any option
assignments from the command-line or from other commands have been
done. Thus, this is the place to code option dependencies: if
'foo' depends on 'bar', then it is safe to set 'foo' from 'bar' as
long as 'foo' still has the same value it was assigned in
'initialize_options()'.
This method must be implemented by all command classes.
r/ r0 r, s r r+ zCommand.finalize_optionsˆ s# € õ ÐIØ!œ^ñ,ñ -ô -ð -r NÚ c óz — ddl m} |€d| ¦ « z }| ||z t j ¬¦ « |dz }| j D ]j\ }}}| |¦ « }|d dk r
|d d… }t | |¦ « }| ||›d|›�z t j ¬¦ « Œkd S ) Nr )Ú
longopt_xlatezcommand options for '%s':)Úlevelz éÿÿÿÿú=z = ) Údistutils.fancy_getoptr5 Úget_command_nameÚannouncer
ÚINFOÚuser_optionsÚ translater# )r ÚheaderÚindentr5 Úoptionr" Úvalues r Údump_optionszCommand.dump_options— së € Ø8Ð8Ð8Ð8Ð8Ð8؈>Ø0°4×3HÒ3HÑ3JÔ3JÑJˆFØ�
Š
�f˜v‘oS¬Xˆ
Ñ6Ô6Ð6ؘ$‘ˆØ"Ô/ð *ð *‰NˆV�Q˜Ø×%Ò% mÑ4Ô4ˆFØ�bŒz˜SÒ Ð Ø œ�ݘD &Ñ)Ô)ˆEØ�MŠM˜&°°°¸¸Ð#>Ñ>Ý #¤ð
ñ
*ô
*ð
*ð
*ð *ð *r c ó0 — t d| j z ¦ « ‚)a¾ A command's raison d'etre: carry out the action it exists to
perform, controlled by the options initialized in
'initialize_options()', customized by other commands, the setup
script, the command-line, and config files, and finalized in
'finalize_options()'. All terminal output and filesystem
interaction should be done by 'run()'.
This method must be implemented by all command classes.
r/ r0 r, s r ÚrunzCommand.run¥ r1 r r* c ó0 — t j ||¦ « dS )zmIf the current verbosity level is of greater than or equal to
'level' print 'msg' to stdout.
Nr )r Úmsgr6 s r r; zCommand.announce² s € õ Œ��sÑÔÐÐÐr c ót — ddl m} |r/t |¦ « t j ¦ « dS dS )z~Print 'msg' to stdout if the global DEBUG (taken from the
DISTUTILS_DEBUG environment variable) flag is true.
r )ÚDEBUGN)Údistutils.debugrI ÚprintÚsysÚstdoutÚflush)r rG rI s r Údebug_printzCommand.debug_print¸ sM € ð *Ð)Ð)Ð)Ð)Ð)Øð Ý�#‰JŒJˆJÝŒJ×ÒÑÔÐÐÐð ð r c ó¬ — t | |¦ « }|€t | ||¦ « |S t |t ¦ « st d|›d|›d|›d�¦ « ‚|S )Nú'z' must be a z (got `z`))r# Úsetattrr Ústrr )r rA ÚwhatÚdefaultÚvals r Ú_ensure_stringlikezCommand._ensure_stringlikeÏ sq € Ý�d˜FÑ#Ô#ˆØˆ;Ý�D˜& 'Ñ*Ô*Ð*؈NݘC¥Ñ%Ô%ð >Ý&Ð&Ø*0¨&¨&°$°$°$¸¸¸ð(=ñ >ô >ð
>àˆ
r c ó4 — | |d|¦ « dS )zWEnsure that 'option' is a string; if not defined, set it to
'default'.
ÚstringN)rW )r rA rU s r Ú
ensure_stringzCommand.ensure_stringÙ s" € ð
×Ò ¨°'Ñ:Ô:Ð:Ð:Ð:r c ó6 — t | |¦ « }|€dS t |t ¦ « r&t | |t j d|¦ « ¦ « dS t |t ¦ « rt d„ |D ¦ « ¦ « }nd}|st d|›d|›d�¦ « ‚dS )zîEnsure that 'option' is a list of strings. If 'option' is
currently a string, we split it either on /,\s*/ or /\s+/, so
"foo bar baz", "foo,bar,baz", and "foo, bar baz" all become
["foo", "bar", "baz"].
Nz,\s*|\s+c 3 ó@ K — | ]}t |t ¦ « V — Œd S ©N)r rS )Ú.0Úvs r ú
z-Command.ensure_string_list..ì s, è è € Ð9Ð9°� A¥sÑ+Ô+Ð9Ð9Ð9Ð9Ð9Ð9r FrQ z!' must be a list of strings (got ú)) r# r rS rR ÚreÚsplitÚlistÚallr )r rA rV Úoks r Úensure_string_listzCommand.ensure_string_listß sÁ € õ �d˜FÑ#Ô#ˆØˆ;؈FÝ
˜�SÑ
!Ô
!ð
'Ý�D˜&¥"¤(¨;¸Ñ"<Ô"<Ñ=Ô=Ð=Ð=Ð=å˜#�tÑ$Ô$ð
ÝÐ9Ð9°SÐ9Ñ9Ô9Ñ9Ô9��à�Øð
'Ý*Ð*à˜˜ ð&ñ'ô 'ð 'ð
'ð
'r c ó€ — | |||¦ « }|�" ||¦ « st d|z ||fz ¦ « ‚d S d S )Nzerror in '%s' option: )rW r )r rA ÚtesterrT Ú error_fmtrU rV s r Ú_ensure_tested_stringzCommand._ensure_tested_stringô s[ € à×%Ò% f¨d°GÑ<Ô<ˆØˆ? 6 6¨#¡;¤;ˆ?Ý&Ð(@À9Ñ(LØ*0°#¨ñ(7ñ 8ô 8ð
8ð ˆ?ˆ?ˆ?r c óT — | |t j j dd¦ « dS )z5Ensure that 'option' is the name of an existing file.Úfilenamez$'%s' does not exist or is not a fileN)rk ÚosÚpathÚisfile©r rA s r Úensure_filenamezCommand.ensure_filenameû s7 € à×"Ò" 62¬7¬>Ø#-Ø#Iñ Kô Kð Kð Kð Kr c óT — | |t j j dd¦ « d S )Nzdirectory namez)'%s' does not exist or is not a directory)rk rn ro Úisdirrq s r Úensure_dirnamezCommand.ensure_dirname s7 € Ø×"Ò" 62¬7¬=Ø#3Ø#Nñ Pô Pð Pð Pð Pr c óH — t | d¦ « r| j S | j j S )NÚcommand_name)Úhasattrrw r Ú__name__r, s r r: zCommand.get_command_name s( € Ý�4˜Ñ(Ô(ð +ØÔ$Ð$à”>Ô*Ð*r c óÐ — | j |¦ « }| ¦ « |D ]4\ }}t | |¦ « €t | |t ||¦ « ¦ « Œ5dS )a> Set the values of any "undefined" options from corresponding
option values in some other command object. "Undefined" here means
"is None", which is the convention used to indicate that an option
has not been changed between 'initialize_options()' and
'finalize_options()'. Usually called from 'finalize_options()' for
options that depend on some other command rather than another
option of the same command. 'src_cmd' is the other command from
which option values will be taken (a command object will be created
for it if necessary); the remaining arguments are
'(src_option,dst_option)' tuples which mean "take the value of
'src_option' in the 'src_cmd' command object, and copy it to
'dst_option' in the current command object".
N)r Úget_command_objr- r# rR )r Úsrc_cmdÚoption_pairsÚsrc_cmd_objÚ
src_optionÚ
dst_options r Úset_undefined_optionszCommand.set_undefined_options s{ € ð Ô'×7Ò7¸Ñ@Ô@ˆØ×$Ò$Ñ&Ô&Ð&Ø(4ð Lð LÑ$ˆZ˜Ý�t˜ZÑ(Ô(Ð0ݘ˜j'°+¸zÑ*JÔ*JÑKÔKÐKøð Lð Lr c ód — | j ||¦ « }| ¦ « |S )zûWrapper around Distribution's 'get_command_obj()' method: find
(create if necessary and 'create' is true) the command object for
'command', call its 'ensure_finalized()' method, and return the
finalized command object.
)r r{ r- )r ÚcommandÚcreateÚcmd_objs r Úget_finalized_commandzCommand.get_finalized_command$ s3 € ð Ô#×3Ò3°G¸VÑDÔDˆØ× Ò Ñ"Ô"Ð"؈r r c ó8 — | j ||¦ « S r] )r Úreinitialize_command)r rƒ Úreinit_subcommandss r rˆ zCommand.reinitialize_command0 s% € ØÔ ×5Ò5°gØ6HñJô Jð Jr c ó: — | j |¦ « dS )zÂRun some other command: uses the 'run_command()' method of
Distribution, which creates and finalizes the command object if
necessary and then invokes its 'run()' method.
N)r Úrun_command)r rƒ s r r‹ zCommand.run_command4 s! € ð
Ô×%Ò% gÑ.Ô.Ð.Ð.Ð.r c óh — g }| j D ]'\ }}|� || ¦ « r| |¦ « Œ(|S )ak Determine the sub-commands that are relevant in the current
distribution (ie., that need to be run). This is based on the
'sub_commands' class attribute: each tuple in that list may include
a method that we call to determine if the subcommand needs to be
run for the current distribution. Return a list of command names.
)Úsub_commandsÚappend)r ÚcommandsÚcmd_nameÚmethods r Úget_sub_commandszCommand.get_sub_commands; sI € ð ˆØ"&Ô"3ð *ð *шX�v؈~ ¨¡¤ˆ~Ø—’ Ñ)Ô)Ð)øØˆr c óV — t j d| ¦ « |¦ « d S )Nzwarning: %s: %s
)r
Úwarnr: )r rG s r r” zCommand.warnK s) € ÝŒÐ$ d×&;Ò&;Ñ&=Ô&=¸sÑCÔCÐCÐCÐCr c ó@ — t j |||| j ¬¦ « d S ©N©r! )r Úexecuter! )r ÚfuncÚargsrG r6 s r r˜ zCommand.executeN s# € ÝŒ�T˜4 ¨d¬lÐ;Ñ;Ô;Ð;Ð;Ð;r éÿ c ó> — t j ||| j ¬¦ « d S r– )r Úmkpathr! )r ÚnameÚmodes r r� zCommand.mkpathQ s! € ÝŒ˜˜d¨D¬LÐ9Ñ9Ô9Ð9Ð9Ð9r c óN — t j ||||| j || j ¬¦ « S )zÑCopy a file respecting verbose, dry-run and force flags. (The
former two default to whatever is in the Distribution object, and
the latter defaults to false for commands that don't define it.)r— )r Ú copy_filer r! )r ÚinfileÚoutfileÚ
preserve_modeÚpreserve_timesÚlinkr6 s r r¡ zCommand.copy_fileT s4 € õ
Ô" 6¨7°MØ#1°t´z°>À4Ø+/¬<ð9ñ 9ô 9ð 9r c óN — t j |||||| j | j ¬¦ « S )z\Copy an entire directory tree respecting verbose, dry-run,
and force flags.
r— )r Ú copy_treer r! )r r¢ r£ r¤ r¥ Úpreserve_symlinksr6 s r r¨ zCommand.copy_tree] s9 € õ
Ô! &¨'°=Ø"0Ð2CØ&*¤j .¸$¼,ðHñ Hô Hð Hr c ó: — t j ||| j ¬¦ « S )z$Move a file respecting dry-run flag.r— )r Ú move_filer! )r ÚsrcÚdstr6 s r r« zCommand.move_filef s € åÔ" 3¨°T´\ÐBÑBÔBÐBr c ó8 — ddl m} |||| j ¬¦ « dS )z2Spawn an external command respecting dry-run flag.r )Úspawnr— N)Údistutils.spawnr¯ r! )r ÚcmdÚsearch_pathr6 r¯ s r r¯ z
Command.spawnj s3 € à)Ð)Ð)Ð)Ð)Ð)Ø
ˆˆc�;¨¬Ð5Ñ5Ô5Ð5Ð5Ð5r c óB — t j ||||| j ||¬¦ « S )N)r! ÚownerÚgroup)r Úmake_archiver! )r Ú base_nameÚformatÚroot_dirÚbase_dirr´ rµ s r r¶ zCommand.make_archiveo s2 € åÔ(¨°F¸HÀhØ15´Ø/4¸EðCñ Cô Cð Cr c ój — |€d|z }t |t ¦ « r|f}n+t |t t f¦ « st d¦ « ‚|€d|›dd |¦ « ›�}| j st j ||¦ « r| ||||¦ « dS t j |¦ « dS )aÌ Special case of 'execute()' for operations that process one or
more input files and generate one output file. Works just like
'execute()', except the operation is skipped and a different
message printed if 'outfile' already exists and is newer than all
files listed in 'infiles'. If the command defined 'self.force',
and it is true, then the command is unconditionally run -- does no
timestamp checks.
Nzskipping %s (inputs unchanged)z9'infiles' must be a string, or a list or tuple of stringszgenerating z from z, )r rS rd Útupler Újoinr r Únewer_groupr˜ r
Údebug)r Úinfilesr£ r™ rš Úexec_msgÚskip_msgr6 s r Ú make_filezCommand.make_fileu sß € ð ÐØ7¸'ÑAˆHõ �g�sÑ#Ô#ð OØ�jˆGˆGݘG¥dE ]Ñ3Ô3ð OÝØMñOô Oð
Oð ÐÐØ29°'°'¸4¿9º9ÀWÑ;MÔ;MÐ;MÐNˆHð
Œ:ð �Ô-¨g°wÑ?Ô?ð Ø�LŠL˜˜t X¨uÑ5Ô5Ð5Ð5Ð5õ
ŒI�hÑÔÐÐÐr )Nr3 )r* r] )r r) )r› )r* r* Nr* )r* r* r r* )r* r* )NNNN)NNr* )#ry Ú
__module__Ú__qualname__Ú__doc__r� r r' r- r r+ rC rE r; rO rW rZ rg rk rr ru r: r� r† rˆ r‹ r’ r” r˜ r� r¡ r¨ r« r¯ r¶ rà © r r r r sw € € € € € ð
ð
ð: €Lð
-ð -ð -ð`'ð 'ð 'ðð ð ð$-ð -ð -ð-ð -ð -ð*ð *ð *ð *ð-ð -ð -ðð ð ð ðð ð ð.ð ð ð ð;ð ;ð ;ð ;ð'ð 'ð 'ð, '+ð8ð 8ð 8ð 8ðKð Kð KðPð Pð Pð+ð +ð +ðLð Lð Lð*ð ð ð ðJð Jð Jð Jð/ð /ð /ðð ð ð Dð Dð Dð<ð <ð <ð <ð:ð :ð :ð :ð JKØ#$ð9ð 9ð 9ð 9ð JKØ./ðHð Hð Hð HðCð Cð Cð Cð6ð 6ð 6ð 6ð
GKØ'+ðCð Cð Cð Cð 78ð ð ð ð ð ð r r )rÆ rL rn rb Údistutils.errorsr Ú distutilsr r r r r r
r rÇ r r úrÊ s¿ ððð ð Ð Ð Ð Ð Ð Ð Ð Ð Ð Ð Ð Ø 1Ð 1Ð 1Ð 1Ð 1Ð 1Ø GÐ GÐ GÐ GÐ GÐ GÐ GÐ GÐ GÐ GÐ GÐ GÐ GÐ GØ Ð Ð Ð Ð Ð ðG ð G ð G ð G ð G ñ G ô G ð G ð G ð G r