/usr/lib64/python3.9/distutils/__pycache__
NameSizeModeActions
archive_util.cpython-39.opt-1.pyc65870644editdlrm
archive_util.cpython-39.opt-2.pyc45450644editdlrm
archive_util.cpython-39.pyc65870644editdlrm
bcppcompiler.cpython-39.opt-1.pyc64980644editdlrm
bcppcompiler.cpython-39.opt-2.pyc62100644editdlrm
bcppcompiler.cpython-39.pyc64980644editdlrm
ccompiler.cpython-39.opt-1.pyc330970644editdlrm
ccompiler.cpython-39.opt-2.pyc167900644editdlrm
ccompiler.cpython-39.pyc331880644editdlrm
cmd.cpython-39.opt-1.pyc139260644editdlrm
cmd.cpython-39.opt-2.pyc80600644editdlrm
cmd.cpython-39.pyc139260644editdlrm
config.cpython-39.opt-1.pyc35290644editdlrm
config.cpython-39.opt-2.pyc31380644editdlrm
config.cpython-39.pyc35290644editdlrm
core.cpython-39.opt-1.pyc66540644editdlrm
core.cpython-39.opt-2.pyc32670644editdlrm
core.cpython-39.pyc66540644editdlrm
cygwinccompiler.cpython-39.opt-1.pyc85030644editdlrm
cygwinccompiler.cpython-39.opt-2.pyc68730644editdlrm
cygwinccompiler.cpython-39.pyc85030644editdlrm
debug.cpython-39.opt-1.pyc1960644editdlrm
debug.cpython-39.opt-2.pyc1960644editdlrm
debug.cpython-39.pyc1960644editdlrm
dep_util.cpython-39.opt-1.pyc27160644editdlrm
dep_util.cpython-39.opt-2.pyc12720644editdlrm
dep_util.cpython-39.pyc27160644editdlrm
dir_util.cpython-39.opt-1.pyc58170644editdlrm
dir_util.cpython-39.opt-2.pyc34390644editdlrm
dir_util.cpython-39.pyc58170644editdlrm
dist.cpython-39.opt-1.pyc343480644editdlrm
dist.cpython-39.opt-2.pyc250570644editdlrm
dist.cpython-39.pyc343480644editdlrm
errors.cpython-39.opt-1.pyc52520644editdlrm
errors.cpython-39.opt-2.pyc27040644editdlrm
errors.cpython-39.pyc52520644editdlrm
extension.cpython-39.opt-1.pyc69170644editdlrm
extension.cpython-39.opt-2.pyc34270644editdlrm
extension.cpython-39.pyc69170644editdlrm
fancy_getopt.cpython-39.opt-1.pyc105020644editdlrm
fancy_getopt.cpython-39.opt-2.pyc76990644editdlrm
fancy_getopt.cpython-39.pyc106250644editdlrm
filelist.cpython-39.opt-1.pyc97610644editdlrm
filelist.cpython-39.opt-2.pyc68900644editdlrm
filelist.cpython-39.pyc98350644editdlrm
file_util.cpython-39.opt-1.pyc59830644editdlrm
file_util.cpython-39.opt-2.pyc38460644editdlrm
file_util.cpython-39.pyc59830644editdlrm
log.cpython-39.opt-1.pyc23150644editdlrm
log.cpython-39.opt-2.pyc22540644editdlrm
log.cpython-39.pyc23150644editdlrm
msvc9compiler.cpython-39.opt-1.pyc174690644editdlrm
msvc9compiler.cpython-39.opt-2.pyc158480644editdlrm
msvc9compiler.cpython-39.pyc175120644editdlrm
msvccompiler.cpython-39.opt-1.pyc147070644editdlrm
msvccompiler.cpython-39.opt-2.pyc131340644editdlrm
msvccompiler.cpython-39.pyc147070644editdlrm
spawn.cpython-39.opt-1.pyc34410644editdlrm
spawn.cpython-39.opt-2.pyc23080644editdlrm
spawn.cpython-39.pyc34410644editdlrm
sysconfig.cpython-39.opt-1.pyc120640644editdlrm
sysconfig.cpython-39.opt-2.pyc85770644editdlrm
sysconfig.cpython-39.pyc120640644editdlrm
text_file.cpython-39.opt-1.pyc84410644editdlrm
text_file.cpython-39.opt-2.pyc33430644editdlrm
text_file.cpython-39.pyc84410644editdlrm
unixccompiler.cpython-39.opt-1.pyc71320644editdlrm
unixccompiler.cpython-39.opt-2.pyc65030644editdlrm
unixccompiler.cpython-39.pyc71320644editdlrm
util.cpython-39.opt-1.pyc155900644editdlrm
util.cpython-39.opt-2.pyc97060644editdlrm
util.cpython-39.pyc155900644editdlrm
version.cpython-39.opt-1.pyc73120644editdlrm
version.cpython-39.opt-2.pyc40270644editdlrm
version.cpython-39.pyc73410644editdlrm
versionpredicate.cpython-39.opt-1.pyc51250644editdlrm
versionpredicate.cpython-39.opt-2.pyc26450644editdlrm
versionpredicate.cpython-39.pyc51250644editdlrm
_msvccompiler.cpython-39.opt-1.pyc127840644editdlrm
_msvccompiler.cpython-39.opt-2.pyc116350644editdlrm
_msvccompiler.cpython-39.pyc128270644editdlrm
__init__.cpython-39.opt-1.pyc3860644editdlrm
__init__.cpython-39.opt-2.pyc2040644editdlrm
__init__.cpython-39.pyc3860644editdlrm
Edit: /usr/lib64/python3.9/distutils/__pycache__/cmd.cpython-39.opt-1.pyc (13926B)
a ´iŸFã@sbdZddlZddlZddlZddlmZddlmZmZm Z m Z m Z ddlm Z Gdd„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@s"eZdZdZgZdd„Zdd„Zdd„Zdd „Zd d „Z dCdd„Z dd„Z dDdd„Z dd„Z dEdd„ZdFdd„Zdd„ZdGdd„Zdd „Zd!d"„Zd#d$„Zd%d&„ZdHd'd(„ZdId*d+„Zd,d-„Zd.d/„Zd0d1„ZdJd2d3„ZdKd5d6„ZdLd7d8„ZdMd9d:„ZdNd;d<„ZdOd=d>„Z dPd?d@„Z!dQdAdB„Z"d S)RÚ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. cCsbddlm}t||ƒstdƒ‚|jtur0tdƒ‚||_| ¡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)Zdistutils.distr Ú isinstanceÚ TypeErrorÚ __class__r Ú RuntimeErrorÚ distributionÚinitialize_optionsZ_dry_runÚverboseÚforceÚhelpÚ finalized)ÚselfÚdistr ©rú%/usr/lib64/python3.9/distutils/cmd.pyÚ__init__/s    zCommand.__init__cCs<|dkr0t|d|ƒ}|dur*t|j|ƒS|Snt|ƒ‚dS)NÚdry_runÚ_)ÚgetattrrÚAttributeError)rÚattrZmyvalrrrÚ __getattr___s  zCommand.__getattr__cCs|js| ¡d|_dS)Né)rÚfinalize_options©rrrrÚensure_finalizediszCommand.ensure_finalizedcCstd|jƒ‚dS)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 overrideN©rrr#rrrr{s ÿzCommand.initialize_optionscCstd|jƒ‚dS)aSet 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%Nr&r#rrrr"ˆs ÿzCommand.finalize_optionsNÚcCsšddlm}|dur d| ¡}|j||tjd�|d}|jD]R\}}}| |¡}|ddkrn|dd…}t||ƒ}|j|d||ftjd�qBdS) Nr)Ú longopt_xlatezcommand options for '%s':)Úlevelz éÿÿÿÿú=z%s = %s) Zdistutils.fancy_getoptr(Úget_command_nameÚannouncer ÚINFOZ user_optionsÚ translater)rÚheaderÚindentr(ÚoptionrÚvaluerrrÚ dump_options—s      ÿzCommand.dump_optionscCstd|jƒ‚dS)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%Nr&r#rrrÚrun¥s ÿz Command.runr!cCst ||¡dS)zmIf the current verbosity level is of greater than or equal to 'level' print 'msg' to stdout. Nr)rÚmsgr)rrrr-²szCommand.announcecCs&ddlm}|r"t|ƒtj ¡dS)z~Print 'msg' to stdout if the global DEBUG (taken from the DISTUTILS_DEBUG environment variable) flag is true. r)ÚDEBUGN)Zdistutils.debugr7ÚprintÚsysÚstdoutÚflush)rr6r7rrrÚ debug_print¸s zCommand.debug_printcCsBt||ƒ}|dur"t|||ƒ|St|tƒs>td|||fƒ‚|S)Nz'%s' must be a %s (got `%s`))rÚsetattrr Ústrr)rr2ÚwhatÚdefaultÚvalrrrÚ_ensure_stringlikeÏs   ÿzCommand._ensure_stringlikecCs| |d|¡dS)zWEnsure that 'option' is a string; if not defined, set it to 'default'. ÚstringN)rB)rr2r@rrrÚ ensure_stringÙszCommand.ensure_stringcCspt||ƒ}|durdSt|tƒr6t||t d|¡ƒn6t|tƒrTtdd„|Dƒƒ}nd}|sltd||fƒ‚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+css|]}t|tƒVqdS©N)r r>)Ú.0ÚvrrrÚ ìóz-Command.ensure_string_list..Fz''%s' must be a list of strings (got %r)) rr r>r=ÚreÚsplitÚlistÚallr)rr2rAÚokrrrÚensure_string_listßs   ÿÿzCommand.ensure_string_listcCs6| |||¡}|dur2||ƒs2td|||fƒ‚dS)Nzerror in '%s' option: )rBr)rr2Ztesterr?Z error_fmtr@rArrrÚ_ensure_tested_stringôs ÿzCommand._ensure_tested_stringcCs| |tjjdd¡dS)z5Ensure that 'option' is the name of an existing file.Úfilenamez$'%s' does not exist or is not a fileN)rPÚosÚpathÚisfile©rr2rrrÚensure_filenameûs þzCommand.ensure_filenamecCs| |tjjdd¡dS)Nzdirectory namez)'%s' does not exist or is not a directory)rPrRrSÚisdirrUrrrÚensure_dirnames þzCommand.ensure_dirnamecCst|dƒr|jS|jjSdS)NÚ command_name)ÚhasattrrYrÚ__name__r#rrrr, s zCommand.get_command_namecGsF|j |¡}| ¡|D](\}}t||ƒdurt||t||ƒƒqdS)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$rr=)rZsrc_cmdZ option_pairsZ src_cmd_objZ src_optionZ dst_optionrrrÚset_undefined_optionss   zCommand.set_undefined_optionscCs|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. )rr\r$)rÚcommandZcreateZcmd_objrrrÚget_finalized_command$szCommand.get_finalized_commandrcCs|j ||¡SrE)rÚreinitialize_command)rr^Zreinit_subcommandsrrrr`0sÿzCommand.reinitialize_commandcCs|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)rr^rrrra4szCommand.run_commandcCs2g}|jD]"\}}|dus"||ƒr | |¡q |S)akDetermine 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. N)Ú sub_commandsÚappend)rÚcommandsZcmd_nameÚmethodrrrÚget_sub_commands;s  zCommand.get_sub_commandscCst d| ¡|¡dS)Nzwarning: %s: %s )r Úwarnr,)rr6rrrrgKsz Command.warncCstj||||jd�dS©N©r)rÚexecuter)rÚfuncÚargsr6r)rrrrjNszCommand.executeéÿcCstj|||jd�dSrh)rÚmkpathr)rÚnameÚmoderrrrnQszCommand.mkpathc Cstj|||||j ||jd�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.)ri)rÚ copy_filerr)rÚinfileÚoutfileÚ preserve_modeÚpreserve_timesÚlinkr)rrrrqTs  þzCommand.copy_filec Cstj||||||j |jd�S)z\Copy an entire directory tree respecting verbose, dry-run, and force flags. ri)rÚ copy_treerr)rrrrsrtruZpreserve_symlinksr)rrrrw]s  þzCommand.copy_treecCstj|||jd�S)z$Move a file respecting dry-run flag.ri)rÚ move_filer)rÚsrcÚdstr)rrrrxfszCommand.move_filecCs ddlm}||||jd�dS)z2Spawn an external command respecting dry-run flag.r)ÚspawnriN)Zdistutils.spawnr{r)rÚcmdÚ search_pathr)r{rrrr{js z Command.spawnc Cstj|||||j||d�S)N)rÚownerÚgroup)rÚ make_archiver)rÚ base_nameÚformatÚroot_dirÚbase_dirr~rrrrr€os þzCommand.make_archivecCs„|durd|}t|tƒr"|f}nt|ttfƒs8tdƒ‚|durRd|d |¡f}|jsdt ||¡rv|  ||||¡n t   |¡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 %s from %sz, ) r r>rLÚtupler ÚjoinrrZ newer_grouprjr Údebug)rZinfilesrsrkrlZexec_msgZskip_msgr)rrrÚ make_fileus  ÿzCommand.make_file)Nr')r!)N)N)N)r!)r)Nr!)rm)r!r!Nr!)r!r!rr!)r!)r!r!)NNNN)NNr!)#r[Ú __module__Ú __qualname__Ú__doc__rbrr r$rr"r4r5r-r<rBrDrOrPrVrXr,r]r_r`rarfrgrjrnrqrwrxr{r€rˆrrrrr sP0     ÿ    ÿ ÿ  ÿ ÿr )r‹r9rRrJZdistutils.errorsrZ distutilsrrrrrr r rrrrÚs