ef?ddlmZddlmZddlmZddlZddlZddlZddlm Z gdZ ddZ dd Z Gd d e Z Gd de ZdS)) convert_path)log)DistutilsOptionErrorN)Command) config_file edit_config option_basesetoptlocalc^|dkrdS|dkrGtjtjtjdS|dkrCtjdkrdpd}tjtd |zStd |) zGet the filename of the distutils, local, global, or per-user config `kind` must be one of "local", "global", or "user" r z setup.cfgglobalz distutils.cfguserposix.z~/%spydistutils.cfgz7config_file() type must be 'local', 'global', or 'user') ospathjoindirname distutils__file__name expanduserr ValueError)kinddots y/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/setuptools/command/setopt.pyrr s  w{ xw||BGOOI,>??QQQ v~~g (S.Bw!!,/Ds/J"K"KLLL NPT U UUFc tjd|tj}d|_||g|D]-\}}|,tjd||||4| |s+tjd||| ||D]\}}|ntjd|||| ||| |s+tjd||||utjd||||| |||/tjd ||s@t|d 5}||ddddS#1swxYwYdSdS) aYEdit a configuration file to include `settings` `settings` is a dictionary of dictionaries or ``None`` values, keyed by command/section name. A ``None`` value means to delete the entire section, while a dictionary lists settings to be changed or deleted in that section. A setting of ``None`` means to delete that setting. zReading configuration from %sc|SN)xs rzedit_config..&srNzDeleting section [%s] from %szAdding new section [%s] to %szDeleting %s.%s from %sz#Deleting empty [%s] section from %szSetting %s.%s to %r in %sz Writing %sw)rdebug configparserRawConfigParser optionxformreaditemsinforemove_section has_section add_section remove_optionoptionssetopenwrite) filenamesettingsdry_runoptssectionr1optionvaluefs rrrsII-x888  ' ) )D"{DIIxj$NN,,55 ? H4gx H H H    ( ( ( (##G,, * 97HMMM  )))!( 5 5 =I6RRR&&w777<<005A7H++G444I3WfeXHHWfe4444 5H\8$$$  (C  A JJqMMM                  s1GGGc.eZdZdZgdZddgZdZdZdS)r zr@c0d|_d|_d|_dSr!) global_config user_configr5selfs rinitialize_optionszoption_base.initialize_optionsSs! rcg}|jr"|td|jr"|td|j||j|s"|tdt |dkrt d||\|_dS)Nr rr z/Must specify only one configuration file option)rCappendrrDr5lenr)rF filenamess rfinalize_optionszoption_base.finalize_optionsXs   4   [22 3 3 3   2   [00 1 1 1 = $   T] + + + 3   [11 2 2 2 y>>A  &A9 %rN)__name__ __module__ __qualname____doc__ user_optionsboolean_optionsrGrMr"rrr r EsXFFL O  %%%%%rr cVeZdZdZdZgdejzZejdgzZdZdZ dZ dS) r z#Save command-line options to a filez1set an option in setup.cfg or another config file))zcommand=czcommand to set an option for)zoption=oz option to set)z set-value=szvalue of the option)removerzremove (unset) the valuerXcrt|d|_d|_d|_d|_dSr!)r rGcommandr: set_valuerXrEs rrGzsetopt.initialize_optionsws6&&t,,,   rct||j|jt d|j|jst ddSdS)Nz%Must specify --command *and* --optionz$Must specify --set-value or --remove)r rMr[r:rr\rXrEs rrMzsetopt.finalize_options~s`$$T*** < 4;#6&'NOO O > !$+ !&'MNN N " ! ! !rct|j|j|jdd|jii|jdS)N-_)rr5r[r:replacer\r7rEs rrunz setopt.runsK M \DK//S994>J K L     rN) rNrOrPrQ descriptionr rRrSrGrMrbr"rrr r is~--EK  !L"1XJ>OOOO     rr )r )F)distutils.utilrrrdistutils.errorsrrr' setuptoolsr__all__rrr r r"rrrhs''''''111111  A A A V V V V&&&&R!%!%!%!%!%'!%!%!%H! ! ! ! ! [! ! ! ! ! r