+
    SBiE              	         R t ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RI	H
t
 ^RIHtHt Rt]P                  ! R] R24      t]P                  ! R	] R
] R24      t]P'                  RR4      t ! R R4      tR R lt]P.                   U u/ uF  p ]! V 4      RbK  	  up tR tR t ! R R4      t]R8X  d>   RtR F3  t] ! R] 24       ] ! RPC                  ]! ]]4      4      4       ] ! 4        K5  	  R# R# u up i )a6  distutils.fancy_getopt

Wrapper around the standard getopt module that provides the following
additional features:
  * short and long options are tied together
  * options have help strings, so fancy_getopt could potentially
    create a complete usage summary
  * options set attributes of a passed-in object
)annotationsN)Sequence)Any)DistutilsArgErrorDistutilsGetoptErrorz[a-zA-Z](?:[a-zA-Z0-9-]*)^$z^(z)=!(z)$-_c                      ] tR t^%tRtRR ltR tR tRR ltR t	R t
R	 tR
 tR tR tRR R lltR tRR ltRR ltRtR# )FancyGetopta  Wrapper around the standard 'getopt()' module that provides some
handy extra functionality:
  * short and long options are tied together
  * options have help strings, and help text can be assembled
    from them
  * options set attributes of a passed-in object
  * boolean options can have "negative aliases" -- eg. if
    --quiet is the "negative alias" of --verbose, then "--quiet"
    on the command line sets 'verbose' to false
Nc                	    Wn         / V n        V P                   '       d   V P                  4        / V n        / V n        . V n        . V n        / V n        / V n        / V n	        . V n
        R # N)option_tableoption_index_build_indexaliasnegative_alias
short_opts	long_opts
short2long	attr_name	takes_argoption_orderselfr   s   &&G/usr/lib/python3.14/site-packages/setuptools/_distutils/fancy_getopt.py__init__FancyGetopt.__init__1   sn     )  
 ! 
     c                	    V P                   P                  4        V P                   F  pWP                   V^ ,          &   K  	  R# )    N)r   clearr   )r   options   & r   r   FancyGetopt._build_indexY   s6    !''F+1fQi( (r   c                	2    Wn         V P                  4        R # r   )r   r   r   s   &&r   set_option_tableFancyGetopt.set_option_table^   s    (r   c                	    WP                   9   d   \        R V R24      hWV3pV P                  P                  V4       W@P                   V&   R# )z$option conflict: already an option ''N)r   r   r   append)r   long_optionshort_optionhelp_stringr#   s   &&&& r   
add_optionFancyGetopt.add_optionb   sU    +++&6{m1E  "=F$$V,-3k*r   c                    WP                   9   # )z[Return true if the option table for this parser has an
option with long name 'long_option'.)r   r   r+   s   &&r   
has_optionFancyGetopt.has_optionl   s     ////r   c                ,    VP                  \        4      # )zTranslate long option name 'long_option' to the form it
has as an attribute of some object: ie., translate hyphens
to underscores.	translatelongopt_xlater1   s   &&r   get_attr_nameFancyGetopt.get_attr_nameq   s     $$]33r   c           
     	    \        V\        4      '       g   Q hVP                  4        FO  w  r4W0P                  9  d   \	        R V RV RV R24      hW@P                  9  g   K<  \	        R V RV RV R24      h	  R# )zinvalid z 'z': option 'z' not defined': aliased option 'N)
isinstancedictitemsr   r   )r   aliaseswhatr   opts   &&&  r   _check_alias_dictFancyGetopt._check_alias_dictw   s    '4((((!--/JE---*tfBug[}M  +++*tfBug-@]S  *r   c                6    V P                  VR4       Wn        R# )z'Set the aliases for this option parser.r   N)rB   r   )r   r   s   &&r   set_aliasesFancyGetopt.set_aliases   s    ug.
r   c                6    V P                  VR4       Wn        R# )zSet the negative aliases for this option parser.
'negative_alias' should be a dictionary mapping option names to
option names, both the key and value must already be defined
in the option table.znegative aliasN)rB   r   )r   r   s   &&r   set_negative_aliases FancyGetopt.set_negative_aliases   s    
 	~/?@,r   c                &   . V n         . V n        V P                  P                  4        / V n        V P
                   EFP  p\        V4      ^8X  d	   Vw  r#p^ pM%\        V4      ^8X  d   Vw  r#rEM\        RV: 24      h\        V\        4      '       d   \        V4      ^8  d   \        RV R24      hVe6   \        V\        4      '       d   \        V4      ^8X  g   \        RV R24      hWPP                  V&   V P                   P                  V4       VR,          R8X  d'   V'       d
   VR,           pV^ R pR	V P                  V&   MgV P                  P                  V4      pVe:   V P                  V,          '       d   \        R
V RV R24      hW P                   R&   RV P                  V&   V P                  P                  V4      pVe<   V P                  V,          V P                  V,          8w  d   \        RV RV R24      h\         P#                  V4      '       g   \        RV R24      hV P%                  V4      V P&                  V&   V'       g   EK   V P                  P                  V4       W P                  V^ ,          &   EKS  	  R# )zPopulate the various data structures that keep tabs on the
option table.  Called by 'getopt()' before it can do anything
worthwhile.
zinvalid option tuple: zinvalid long option 'z"': must be a string of length >= 2Nzinvalid short option 'z"': must a single character or None=:Tzinvalid negative alias 'r;   z' takes a valueFzinvalid alias 'z%': inconsistent with aliased option 'z/' (one of them takes a value, the other doesn'tzinvalid long option name 'z)' (must be letters, numbers, hyphens only)r   r   r   r"   repeatr   len
ValueErrorr<   strr   r*   r   r   getr   
longopt_rematchr8   r   )r   r#   longshorthelprN   alias_tos   &      r   _grok_option_tableFancyGetopt._grok_option_table   s{   
 ''F6{a$*!TV!,2)T6 !#9&!DEE dC((CIM*+D61ST  ]
5#(>(>3u:QR?*,UG3UV  !'KKNN!!$'Bx3!CKEAbz'+t$  ..2248'~~h//26tf =//7jI 
 *.NN2&',t$ zz~~d+H#>>$'4>>(+CC.)$ 0++3* 5,,  ##D))*0 7> > 
 $(#5#5d#;DNN4 u&&u-,0a)I (r   c                   V ^8  d   QhRR/#    argszSequence[str] | None )formats   "r   __annotate__FancyGetopt.__annotate__   s     ; ;/ ;r   c                   Vf   \         P                  R,          pVf   \        4       pRpMRpV P                  4        RP	                  V P
                  4      p \        P                  ! WV P                  4      w  rQT EFQ  w  rx\        T4      ^8X  d*   T^ ,          R8X  d   T P                  T^,          ,          pM)\        T4      ^8  d   TR,          R8X  g   Q hTR	,          pT P                  P                  T4      p	T	'       d   T	pT P                  T,          '       g9   TR
8X  g   Q R4       hT P                  P                  T4      p	T	'       d   T	p^ pM^pT P                   T,          p
T'       d1   T P"                  P                  T
4      e   \%        Y*^ 4      ^,           p\'        Y*T4       T P(                  P+                  Yx34       EKT  	  T'       d   Y3# T#   \        P                   d   p\        T4      hRp?ii ; i)a  Parse command-line options in args. Store as attributes on object.

If 'args' is None or not supplied, uses 'sys.argv[1:]'.  If
'object' is None or not supplied, creates a new OptionDummy
object, stores option values there, and returns a tuple (args,
object).  If 'object' is supplied, it is modified in place and
'getopt()' just returns 'args'; in both cases, the returned
'args' is a modified copy of the passed-in 'args' list, which
is left untouched.
N   NNTF r	   :Nr]   Nz--:r]   NN zboolean option can't have value)sysargvOptionDummyrY   joinr   getoptr   errorr   rO   r   r   rR   r   r   r   rN   getattrsetattrr   r*   )r   r^   objectcreated_objectr   optsmsgrA   valr   attrs   &&&        r   rl   FancyGetopt.getopt   s    <88B<D> ]F!N"N!XXdoo.
	)tHJD HC3x1}Q3ooc!f-3x!|B477"gJJNN3'E>>#&&byC"CCy++//4CCC>>#&D t{{t,8fA.2F#&$$cZ05 : <KG || 	)#C((	)s   #G# #H8HHc                L    V P                   f   \        R4      hV P                   # )zReturns the list of (option, value) tuples processed by the
previous run of 'getopt()'.  Raises RuntimeError if
'getopt()' hasn't been called yet.
z!'getopt()' hasn't been called yet)r   RuntimeError)r   s   &r   get_option_orderFancyGetopt.get_option_order  s(    
 $BCC$$$r   c                &   ^ pV P                    FN  pV^ ,          pV^,          p\        V4      pVR,          R8X  d
   V^,
          pVe
   V^,           pWb8  g   KL  TpKP  	  V^,           ^,           ^,           p^NpW,
          p	RV,          p
V'       d   V.pMR.pV P                    F  pVR,          w  rEp\        W4      pVR,          R8X  d   V^ R pVfE   V'       d$   VP                  RVRV 2 RV^ ,           24       MdVP                  RVRV 2 24       MKV RV R	2pV'       d$   VP                  RVRV 2 RV^ ,           24       MVP                  RVRV 2 24       VR
,           F  pVP                  W,           4       K  	  K  	  V# )z|Generate help text (a list of strings, one per suggested line of
output) from the option table for this FancyGetopt object.
rK   rf   zOption summary::N   Nz  --<z  z (-)rd   rM   )r   rO   	wrap_textr*   )r   headermax_optr#   rU   rV   ell	opt_width
line_width
text_width
big_indentlinesrW   text	opt_namess   &&             r   generate_helpFancyGetopt.generate_help'  s    ''F!9D1IEd)CBx3Ag Ag} ( aK!Oa'	0 
+
9_
HE&'E''F &r
DT.DBx3Abz }LL4QwiK'847)!DELL4QwiK'8!9:
  $fCwa0	LL4	!G9'=RQy!IJLL4	!G9'=!>?BxxZ-.  - (0 r   c                	    Vf   \         P                  pV P                  V4       F  pVP                  VR,           4       K  	  R # )N
)rh   stdoutr   write)r   r   filelines   &&& r   
print_helpFancyGetopt.print_helpu  s5    <::D&&v.DJJtd{# /r   )r   r   r   r   r   r   r   rN   r   r   r   r   )NN)__name__
__module____qualname____firstlineno____doc__r   r   r&   r.   r2   r8   rB   rE   rH   rY   rl   ry   r   r   __static_attributes__r_   r   r   r   r   %   sX    	&P2
40
4

-N1`;z%L\$ $r   r   c                   V ^8  d   QhRR/# r\   r_   )r`   s   "r   ra   ra   |  s     ' '6J 'r   c                \    \        V 4      pVP                  V4       VP                  W24      # r   )r   rH   rl   )optionsnegative_optrp   r^   parsers   &&&& r   fancy_getoptr   |  s)    !F
-==&&r   rf   c                   V f   . # \        V 4      V8:  d   V .# V P                  4       p V P                  \        4      p \        P
                  ! RV 4      pV Uu. uF  q3'       g   K  VNK  	  pp. pV'       d   . p^ pV'       df   \        V^ ,          4      pWg,           V8:  d&   VP                  V^ ,          4       V^  Wg,           pKL  V'       d   VR,          ^ ,          R8X  d   VR  V'       dJ   V^ 8X  d+   VP                  V^ ,          ^ V 4       V^ ,          VR V^ &   V^ ,          ^ ,          R8X  d   V^  VP                  RP                  V4      4       K  V# u upi )zwrap_text(text : string, width : int) -> [string]

Split 'text' into multiple lines of no more than 'width' characters
each, and return the list of strings that results.
Nz( +|-+)rf   rg   rM   )rO   
expandtabsr6   WS_TRANSresplitr*   rk   )r   widthchunkschr   cur_linecur_lenr   s   &&      r   r   r     s=    |	
4yEv??D>>(#DXXj$'F!(6RRbb6F(E
fQi.C}%q	*1I!- Q3 6  !|q	!E 23"1Ief-q	
 ay|s"1I 	RWWX&'LK )s   	E (E c                ,    V P                  \        4      # )zPConvert a long option name to a valid Python identifier by
changing "-" to "_".
r5   )rA   s   &r   translate_longoptr     s     ==''r   c                  ,    ] tR tRtRt. 3R R lltRtR# )rj   i  z[Dummy class just used as a place to hold command-line option
values as instance attributes.c                   V ^8  d   QhRR/# )r]   r   zSequence[Any]r_   )r`   s   "r   ra   OptionDummy.__annotate__  s     % % %r   c                0    V F  p\        WR4       K  	  R# )zcCreate a new OptionDummy instance.  The attributes listed in
'options' will be initialized to None.N)ro   )r   r   rA   s   && r   r   OptionDummy.__init__  s     CDt$ r   r_   N)r   r   r   r   r   r   r   r_   r   r   rj   rj     s    & 13 % %r   rj   __main__zTra-la-la, supercalifragilisticexpialidocious.
How *do* you spell that odd word, anyways?
(Someone ask Mary -- she'll know [or she'll
say, "How should I know?"].)zwidth: r   )
         (   )"r   
__future__r   rl   r   stringrh   collections.abcr   typingr   errorsr   r   longopt_patcompilerS   neg_alias_rerQ   	maketransr7   r   r   
whitespaceordr   r   r   rj   r   r   wprintrk   )_wschars   0r   <module>r      s   #  	  
 $  ; +ZZ1[M+,
 zzB{m4}B?@ c3'T$ T$n
' .4->->?->'CL#->?3l(% % z D smdii	$*+,  W @s   C9