
    vKgy                        S r SSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKJ	r	  SSK
Jr  SSKJrJr  SSKJr  SSKJr  SS	KJrJrJrJr  SS
KJrJr  SSKJrJrJr  \R>                  " S5      r S r! " S S5      r" " S S5      r#S r$g)z}distutils.dist

Provides the Distribution class, which represents the module distribution
being built/installed/distributed.
    N)Iterable)message_from_file)canonicalize_namecanonicalize_version   log)DEBUG)DistutilsArgErrorDistutilsClassErrorDistutilsModuleErrorDistutilsOptionError)FancyGetopttranslate_longopt)check_environrfc822_escape	strtoboolz^[a-zA-Z]([a-zA-Z0-9_]*)$c                    [        U [        5      (       a   U $ [        U [        5      (       dR  [        U 5      R                  nSnUR
                  " S0 [        5       D6n[        R                  " U5        [        U 5      n U $ )Nz>Warning: '{fieldname}' should be a list, got type '{typename}' )	
isinstancestrlisttype__name__formatlocalsr	   warning)value	fieldnametypenamemsgs       Z/var/www/highfloat_scraper/venv/lib/python3.13/site-packages/setuptools/_distutils/dist.py_ensure_listr#   %   sk    % 	 L t$$;''Njj$68$CUL    c            	          \ rS rSrSr/ SQrSr/ SQr\ V VVs/ sH  n[        US   5      PM     snnn r	SS0r
S+S
 jrS rS,S jrS rS rS+S jrS rS rS rS r S-S\4S jjrS rS rS rS rS rS rS.S jrS+S jrS/S jr\ RB                  4S jr"S  r#S! r$S" r%S# r&S$ r'S% r(S& r)S' r*S( r+S) r,S*r-g	s  snnn f )0Distribution4   a  The core of the Distutils.  Most of the work hiding behind 'setup'
is really done within a Distribution instance, which farms the work out
to the Distutils commands specified on the command line.

Setup scripts will almost never instantiate Distribution directly,
unless the 'setup()' function is totally inadequate to their needs.
However, it is conceivable that a setup script might wish to subclass
Distribution for some specialized purpose, and then pass the subclass
to 'setup()' as the 'distclass' keyword argument.  If so, it is
necessary to respect the expectations that 'setup' has of Distribution.
See the code for 'setup()', in core.py, for details.
))verbosevzrun verbosely (default)r   )quietqz!run quietly (turns verbosity off))zdry-runnzdon't actually do anything)helphzshow detailed help message)zno-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-commandsNzlist all available commands)nameNzprint package name)versionVzprint package version)fullnameNzprint <package name>-<version>)authorNzprint the author's name)author-emailNz print the author's email address)
maintainerNzprint the maintainer's name)zmaintainer-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)urlNzprint the URL for this package)licenseNz print the license of the package)licenceNzalias for --license)descriptionNzprint the package description)zlong-descriptionNz"print the long package description)	platformsNzprint the list of platforms)classifiersNzprint the list of classifiers)keywordsNzprint 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 obsoleter   r*   r(   Nc           	         SU l         SU l        SU l        U R                   H  n[	        XS5        M     [        5       U l        U R                  R                   H(  nSU-   n[	        X[        U R                  U5      5        M*     0 U l	        SU l
        SU l        SU l        0 U l        / U l        SU l        0 U l        SU l        SU l        SU l        SU l        SU l        SU l        SU l        SU l        SU l        SU l        SU l        0 U l        0 U l        U(       GaN  UR=                  S5      nUbL  US	 UR?                  5        H5  u  pgU RA                  U5      nUR?                  5        H  u  pSU
4X'   M     M7     S	U;   a#  US	   US
'   US		 Sn[B        RD                  " U5        UR?                  5        H  u  p[G        U R                  SU-   5      (       a!  [        U R                  SU-   5      " U
5        MD  [G        U R                  U5      (       a  [	        U R                  X5        Mw  [G        X5      (       a  [	        XU
5        M  SU< 3n[B        RD                  " U5        M     SU l$        U R                  b:  U R                   H*  nURK                  S5      (       d    OUS:X  d  M#  SU l$          O   U RM                  5         g)a  Construct a new Distribution instance: initialize all the
attributes of a Distribution, and then use 'attrs' (a dictionary
mapping attribute names to values) to assign some of those
attributes their "real" values.  (Any attributes not mentioned in
'attrs' will be assigned to some null value: 0, None, an empty list
or dictionary, etc.)  Most importantly, initialize the
'command_obj' attribute to the empty dictionary; this will be
filled in with real command objects by 'parse_command_line()'.
TFr   get_N optionszsetup scriptr9   r8   z:'licence' distribution option is deprecated; use 'license'set_zUnknown distribution option: -z--no-user-cfg)'r(   dry_runr-   display_option_namessetattrDistributionMetadatametadata_METHOD_BASENAMESgetattrcmdclasscommand_packagesscript_namescript_argscommand_options
dist_filespackagespackage_datapackage_dir
py_modules	librariesheadersext_modulesext_packageinclude_dirs
extra_pathscripts
data_filespasswordcommand_objhave_rungetitemsget_option_dictwarningswarnhasattrwant_user_cfg
startswithfinalize_options)selfattrsattrbasenamemethod_namerD   commandcmd_optionsopt_dictoptvalr!   keyargs                 r"   __init__Distribution.__init__~   s    	--DD" . -.77H 8+KDwt}}k'JK 8  !%
    " 
     
 ii	*G")$,3MMO(G#33G<H$/$5$5$7)7(= %8 -<
 E!#(#3i )$Rc" "KKM4==&3,77DMM6C<8=T]]C00DMM34T''Ds+9#ACMM#& *" "'''~~c**/)).D& ( 	r$   c                 b    U R                   R                  U5      nUc  0 =o R                   U'   U$ )zGet the option dictionary for a given command.  If that
command's option dictionary hasn't been created yet, then create it
and return the new dictionary; otherwise, return the existing
option dictionary.
)rR   rc   )rl   rq   dicts      r"   re   Distribution.get_option_dict  s7     ##''0<355D''0r$   c                    SSK Jn  Uc#  [        U R                  R	                  5       5      nUb  U R                  X1-   5        US-   nU(       d  U R                  US-   5        g U H  nU R                  R                  U5      nUc  U R                  USU S3-   5        M;  U R                  USU S3-   5        U" U5      nUR                  S	5       H  nU R                  US-   U-   5        M     M     g )
Nr   )pformatz  zno commands known yetzno option dict for 'z	' commandzoption dict for '
' command:
)pprintr~   sortedrR   keysannouncerc   split)	rl   headercommandsindentr~   cmd_namers   outlines	            r"   dump_option_dictsDistribution.dump_option_dicts$  s    "d22779:HMM&/*d]FMM&#::; H++//9Hf)=hZy'QQRf):8*J'OOPh'IIdODMM&4-$"67 , !r$   c                 4   [        5         U R                  5        Vs/ sH4  n[        R                  R	                  U5      (       d  M)  [        U5      PM6     nn[        (       a/  U R                  SR                  SR                  U5      5      5        U$ s  snf )av  Find as many configuration files as should be processed for this
platform, and return a list of filenames in the order in which they
should be parsed.  The filenames returned are guaranteed to exist
(modulo nasty race conditions).

There are multiple possible config files:
- distutils.cfg in the Distutils installation directory (i.e.
  where the top-level Distutils __inst__.py file lives)
- a file in the user's home directory named .pydistutils.cfg
  on Unix and pydistutils.cfg on Windows/Mac; may be disabled
  with the ``--no-user-cfg`` option
- setup.cfg in the current directory
- a file named by an environment variable
zusing config files: {}z, )
r   
_gen_pathsospathisfiler   r
   r   r   join)rl   r   filess      r"   find_config_filesDistribution.find_config_files>  sl     	'+'8Q'8tBGGNN4<PT'8Q5MM299$))E:JKL Rs   'BBc              #     #    [         R                  " [        R                  S   R                  5      R
                  nUS-  v   S[        R                  S:H  -  nUS-   nU R                  (       aL  [        R                  " [        5         [         R                  " S5      R                  5       U-  v   S S S 5        [         R                  " S5      v   [        R                  " [        5         [         R                  " [        R                  " S5      5      v   S S S 5        g ! , (       d  f       Nv= f! , (       d  f       g = f7f)	N	distutilszdistutils.cfg.posixzpydistutils.cfg~z	setup.cfgDIST_EXTRA_CONFIG)pathlibPathsysmodules__file__parentr   r/   ri   
contextlibsuppressRuntimeError
expanduser	TypeErrorgetenv)rl   sys_dirprefixfilenames       r"   r   Distribution._gen_pathsU  s     ,,s{{;7@@AHH'' 7*+--$$\2ll3'224x?? 3 ll;''   +,,ryy)<=>> ,+ 32 ,+s6   B	E*D%5:E/-D6	E%
D3/E6
E Ec                    SSK Jn  [        R                  [        R                  :w  a  / SQnO/ n[        U5      nUc  U R                  5       n[        (       a  U R                  S5        U" 5       nU H  n[        (       a  U R                  SU 35        UR                  USS9  UR                  5        He  nUR                  U5      nU R                  U5      nU H:  n	U	S:w  d  M  X;  d  M  UR                  Xi5      n
U	R                  S	S
5      n	XZ4X'   M<     Mg     UR                  5         M     SU R                   ;   a  U R                   S   R#                  5        Hp  u  n	u  pU R$                  R                  U	5      n U(       a  ['        X[)        U
5      (       + 5        MG  U	S;   a  ['        X	[)        U
5      5        Md  ['        X	U
5        Mr     g g ! [*         a  n[-        U5      eS nAff = f)Nr   )ConfigParser)zinstall-basezinstall-platbasezinstall-libzinstall-platlibzinstall-purelibzinstall-headerszinstall-scriptszinstall-datar   zexec-prefixhomeuserrootz"Distribution.parse_config_files():z
  reading zutf-8encodingr   rF   _global)r(   rG   )configparserr   r   r   base_prefix	frozensetr   r
   r   readsectionsrD   re   rc   replacerx   rR   rd   negative_optrI   r   
ValueErrorr   )rl   	filenamesr   ignore_optionsparserr   sectionrD   rs   rt   ru   _srcaliasr!   s                 r"   parse_config_filesDistribution.parse_config_filesh  s   - ::(N   N">2..0I5MM>?!Hu
8*56KK7K3!??, ..1//8"Cj(S-F$jj6!kk#s3)1	 #	 - OO! "* t+++$($8$8$B$H$H$J [d))--c243-?@ 669S>:3/ %K , " 4.s334s$   !G&GG
G/G**G/c                    U R                  5       n/ U l        [        XR                  -   5      nUR	                  U R
                  5        UR                  SS05        UR                  U R                  U S9nUR                  5       n[        R                  " 5       R                  [        R                  SU R                  -  -
  5        U R                  U5      (       a  gU(       a  U R!                  X#5      nUc  gU(       a  M  U R"                  (       a2  U R%                  U['        U R                  5      S:H  U R                  S9  gU R                  (       d  [)        S5      eg	)
a  Parse the setup script's command line, taken from the
'script_args' instance attribute (which defaults to 'sys.argv[1:]'
-- see 'setup()' in core.py).  This list is first processed for
"global options" -- options that set attributes of the Distribution
instance.  Then, it is alternately scanned for Distutils commands
and options for that command.  Each new command terminates the
options for the previous command.  The allowed options for a
command are determined by the 'user_options' attribute of the
command class -- thus, we have to be able to load command classes
in order to parse the command line.  Any error in that 'options'
attribute raises DistutilsGetoptError; any error on the
command-line raises DistutilsArgError.  If no Distutils commands
were found on the command line, raises DistutilsArgError.  Return
true if command-line was successfully parsed and we should carry
on with executing commands; false if no errors but we shouldn't
execute commands (currently, this only happens if user asks for
help).
r9   r8   )argsobject
   Nr   display_optionsr   zno commands suppliedT)_get_toplevel_optionsr   r   r   set_negative_aliasesr   set_aliasesgetoptrQ   get_option_orderlogging	getLoggersetLevelWARNr(   handle_display_options_parse_command_optsr-   
_show_helplenr   )rl   toplevel_optionsr   r   option_orders        r"   parse_command_lineDistribution.parse_command_line  s0   .  557 -0D0DDE##D$5$56Iy12}}$"2"24}@..0$$W\\B4E%EF &&|44++F9D| d 99OODMM(:a(?$--    }}#$:;; r$   c                 "    U R                   S/-   $ )zReturn the non-display options recognized at the top level.

This includes options that are recognized *only* at the top
level as well as options recognized for commands.
)zcommand-packages=Nz0list of packages that provide distutils commands)global_optionsrl   s    r"   r   "Distribution._get_toplevel_options  s!     ""&
 
 	
r$   c                    SSK Jn  US   n[        R                  U5      (       d  [	        SU S35      eU R
                  R                  U5         U R                  U5      n[        XS5      (       d  [        SU S35      e[        US5      (       a  [        UR                  [        5      (       d  S	n[        Xe-  5      eU R                   n[        US
5      (       a+  UR#                  5       nUR%                  UR                   5        [        US5      (       a5  [        UR&                  [        5      (       a  [)        UR&                  5      nO/ nUR+                  U R,                  UR                  -   U-   5        UR/                  U5        UR1                  USS 5      u  p)[        U	S5      (       a$  U	R2                  (       a  U R5                  USU/S9  g[        US5      (       a  [        UR&                  [        5      (       am  Sn
UR&                   HS  u  pp[        XR7                  U5      5      (       d  M'  Sn
[9        U5      (       a	  U" 5         MB  [        SU< SU S35      e   U
(       a  gU R;                  U5      n[=        U	5      R?                  5        H  u  nnSU4UU'   M     U$ ! [         a  n[        U5      eSnAff = f)a  Parse the command-line options for a single command.
'parser' must be a FancyGetopt instance; 'args' must be the list
of arguments, starting with the current command (whose options
we are about to parse).  Returns a new version of 'args' with
the next command at the front of the list; will be the empty
list if there are no more commands on the command line.  Returns
None if the user asked for help on this command.
r   Commandzinvalid command name ''Nzcommand class z must subclass Commanduser_optionszIcommand class %s must provide 'user_options' attribute (a list of tuples)r   help_optionsr   r-   Fr   zinvalid help function z for help option 'z-': must be a callable object (function, etc.)zcommand line) distutils.cmdr   
command_rematch
SystemExitr   appendget_command_classr   r   
issubclassr   rh   r   r   r   r   copyupdater   fix_help_optionsset_option_tabler   r   r   r-   r   get_attr_namecallablere   varsrd   )rl   r   r   r   rq   	cmd_classr!   r   r   optshelp_option_foundhelp_option_short_descfuncrs   r/   r   s                     r"   r    Distribution._parse_command_opts  s    	* q'((5gYa@AAW%
	)..w7I )--% +AB  I~..911488>  &co66 ((9n--',,.L	 6 67 9n--*""D3
 3
 ,I,B,BCLL 	)"8"88<G	
 	##L1}}T!"X.4  TYYOOFEYKOP9n--*""D3
 3
 !"4=4J4J0U4!5!5k!BCC()%~~14TH<N{m \I I  5K ! ''0:++-KD%,e4HTN . S $ 	)#C((	)s   J1 1
K;KKc                 
   S Hx  n[        U R                  U5      nUc  M  [        U[        5      (       d  M5  UR	                  S5       Vs/ sH  o3R                  5       PM     nn[        U R                  X5        Mz     gs  snf )zSet final values for all the options on the Distribution
instance, analogous to the .finalize_options() method of Command
objects.
r=   r;   N,)rM   rK   r   r   r   striprI   )rl   rn   r   elms       r"   rk   Distribution.finalize_options_  sj    
 .DDMM40E}%%%05C0@A0@0@At3 .
 Bs   B r   c                 d   SSK Jn  SSKJn  U(       a]  U(       a  U R	                  5       nOU R
                  nUR                  U5        UR                  U R                  S-   5        [        5         U(       a6  UR                  U R                  5        UR                  S5        [        5         U H  n[        U[        5      (       a  [        X5      (       a  Un	OU R                  U5      n	[        U	S5      (       aQ  [        U	R                   ["        5      (       a2  UR                  U	R$                  ['        U	R                   5      -   5        OUR                  U	R$                  5        UR                  SU	R(                   S35        [        5         M     [        U" U R*                  5      5        g	)
a  Show help for the setup script command-line in the form of
several lists of command-line options.  'parser' should be a
FancyGetopt instance; do not expect it to be returned in the
same state, as its option table will be reset to make it
generate the correct help text.

If 'global_options' is true, lists the global options:
--verbose, --dry-run, etc.  If 'display_options' is true, lists
the "display-only" options: --name, --version, etc.  Finally,
lists per-command help for every command name or command class
in 'commands'.
r   r   	gen_usagez
Global options:zKInformation display options (just display information, ignore any commands)r   zOptions for 'r   N)r   r   distutils.corer  r   r   r   
print_helpcommon_usageprintr   r   r   r   r   rh   r   r   r   r   r   rP   )
rl   r   r   r   r   r   r  rD   rq   klasss
             r"   r   Distribution._show_helpl  sO     	*,446--##G,d//2EEFG##D$8$89] GG'4((Z-I-I..w7un--*U=O=OQU2V2V''&&)9%:L:L)MM ''(:(:;enn-=ZHIG   	i(()*r$   c                 ,   SSK Jn  U R                  (       a6  U R                  5         [	        5         [	        U" U R
                  5      5        gSn[        5       nU R                   H  nUR                  US   5        M     U H  u  pgU(       d  M  Xd;   d  M  [        U5      n[        U R                  SU-   5      " 5       nUS;   a  [	        SR                  U5      5        O,US;   a  [	        SR                  U5      5        O[	        U5        SnM     U$ )	zIf there were any non-global "display-only" options
(--help-commands or the metadata display options) on the command
line, display the requested info and return true; else return
false.
r   r  r   rB   r   r   )r<   r>   r?   r@   r   )r  r  help_commandsprint_commandsr	  rP   setr   addr   rM   rK   r   )	rl   r   r  any_display_optionsis_display_optionoptionrt   ru   r   s	            r"   r   #Distribution.handle_display_options  s     	-
 !G)D,,-.
  E**F!!&), + %HCss/',v|<>33#((5/*PP$))E*+%L&'# % #"r$   c                     [        US-   5        U HS  nU R                  R                  U5      nU(       d  U R                  U5      n UR                  n[        SX4U4-  5        MU     g! [
         a    Sn N#f = f)zJPrint a subset of the list of all commands -- used by
'print_commands()'.
:(no description available)z
  %-*s  %sN)r	  rN   rc   r   r:   AttributeError)rl   r   r   
max_lengthcmdr
  r:   s          r"   print_command_listDistribution.print_command_list  s{     	fslCMM%%c*E..s3;#// ,*;!??@  " ;:;s   A))A87A8c                 z   SSK nUR                  R                  n[        U5      nU R                  R                  5        Vs/ sH  oDU;  d  M
  UPM     nnSnX%-    H  n[        U5      U:  d  M  [        U5      nM!     U R                  USU5        U(       a  [        5         U R                  USU5        ggs  snf )a>  Print out a help message listing all available commands with a
description of each.  The list is divided into "standard commands"
(listed in distutils.command.__all__) and "extra commands"
(mentioned in self.cmdclass, but not a standard command).  The
descriptions come from the command class attribute
'description'.
r   NzStandard commandszExtra commands)	distutils.commandrq   __all__r  rN   r   r   r  r	  )rl   r   std_commandsis_stdr  extra_commandsr  s          r"   r  Distribution.print_commands  s     	! ((00\")-););)=S)=#FAR#)=S
0C3x*$ X
 1 	.A:NG##N4DjQ  Ts   B8B8c                    SSK nUR                  R                  n[        U5      nU R                  R                  5        Vs/ sH  oDU;  d  M
  UPM     nn/ nX%-    HU  nU R                  R                  U5      nU(       d  U R                  U5      n UR                  nUR                  XH45        MW     U$ s  snf ! [         a    Sn N+f = f)a  Get a list of (command, description) tuples.
The list is divided into "standard commands" (listed in
distutils.command.__all__) and "extra commands" (mentioned in
self.cmdclass, but not a standard command).  The descriptions come
from the command class attribute 'description'.
r   Nr  )r  rq   r  r  rN   r   rc   r   r:   r  r   )	rl   r   r   r!  r  r"  rvr
  r:   s	            r"   get_command_listDistribution.get_command_list  s     	! ((00\")-););)=S)=#FAR#)=S0CMM%%c*E..s3;#// IIs() 1 	 T " ;:;s   B7B7B<<C
Cc                    U R                   n[        U[        5      (       dX  Uc  SnUR                  S5       Vs/ sH  o"S:w  d  M
  UR	                  5       PM     nnSU;  a  UR                  SS5        Xl         U$ s  snf )z9Return a list of packages from which commands are loaded.rC   r   zdistutils.commandr   )rO   r   r   r   r   insert)rl   pkgspkgs      r"   get_command_packages!Distribution.get_command_packages  st    $$$%%|+/::c?H?CRiKCIIK?DH"$.A23$(!	 Is   A<A<c                    U R                   R                  U5      nU(       a  U$ U R                  5        HG  nU SU 3nUn [        U5        [        R
                  U   n [        Xe5      nX R                   U'   Us  $    [        SU S35      e! [         a     Mg  f = f! [         a    [        SU SU SU S35      ef = f)a'  Return the class that implements the Distutils command named by
'command'.  First we check the 'cmdclass' dictionary; if the
command is mentioned there, we fetch the class object from the
dictionary and return it.  Otherwise we load the command module
("distutils.command." + command) and fetch the command class from
the module.  The loaded class is also stored in 'cmdclass'
to speed future calls to 'get_command_class()'.

Raises DistutilsModuleError if the expected module could not be
found, or if that module does not define the expected class.
r   zinvalid command 'z' (no class 'z' in module 'z')r   )
rN   rc   r,  
__import__r   r   ImportErrorrM   r  r   )rl   rq   r
  pkgnamemodule_name
klass_namemodules          r"   r   Distribution.get_command_class  s     !!'*L002G$IQwi0K J;'[13 &+MM'"L% 3( #%6wiq#ABB  
 " *'yj\WbVccef s   B!B 
BB  C c                 j   U R                   R                  U5      nU(       d  U(       a  [        (       a  U R                  SU S35        U R	                  U5      nU" U 5      =o0R                   U'   SU R
                  U'   U R                  R                  U5      nU(       a  U R                  X55        U$ )zReturn the command object for 'command'.  Normally this object
is cached on a previous call to 'get_command_obj()'; if no command
object for 'command' is in the cache, then we either create and
return it (if 'create' is true) or return None.
z*Distribution.get_command_obj(): creating 'z' command objectF)ra   rc   r
   r   r   rb   rR   _set_command_options)rl   rq   createcmd_objr
  rD   s         r"   get_command_objDistribution.get_command_obj@  s     ""&&w/6u!!(	)9;
 **73E27+=G&&w/%*DMM'" **..w7G))';r$   c           
          UR                  5       nUc  U R                  U5      n[        (       a  U R                  SU S35        UR	                  5        H  u  nu  pV[        (       a  U R                  SU SU SU S35         UR
                   Vs/ sH  n[        U5      PM     nn UR                  n	 [        U[        5      n
XI;   a&  U
(       a  [        XU   [        U5      (       + 5        M  XH;   a  U
(       a  [        X[        U5      5        M  [        X5      (       a  [        XU5        M  [        SU S	U S
U S35      e   gs  snf ! [         a    / n Nf = f! [         a    0 n	 Nf = f! [         a  n[        U5      eSnAff = f)aI  Set the options for 'command_obj' from 'option_dict'.  Basically
this means copying elements of a dictionary ('option_dict') to
attributes of an instance ('command').

'command_obj' must be a Command instance.  If 'option_dict' is not
supplied, uses the standard option dictionary for this command
(from 'self.command_options').
Nz  setting options for 'r   z    z = z (from )z	error in z: command 'z' has no such option 'r   )get_command_namere   r
   r   rd   boolean_optionsr   r  r   r   r   rI   r   rh   r   r   )rl   ra   option_dictcommand_namer  sourcer   o	bool_optsneg_opt	is_stringr!   s               r"   r7  !Distribution._set_command_options]  s    #335..|<K5MM3L>LM'2'8'8':#FOVuVHCwgfXQGH;F;V;VW;Va.q1;V	W%220&uc2	$Ki>N:NO(YK51AB[11K7.#F8;|nDZ[aZbbcd + (; X! 	 "   0*3//0s`   EE
&E)E!69E31!E3E32E3
EEE!E0/E03
F=FFc                 l   SSK Jn  [        X5      (       d  UnU R                  U5      nOUR	                  5       nUR
                  (       d  U$ UR                  5         SUl        SU R                  U'   U R                  U5        U(       a(  UR                  5        H  nU R                  XR5        M     U$ )a;  Reinitializes a command to the state it was in when first
returned by 'get_command_obj()': ie., initialized but not yet
finalized.  This provides the opportunity to sneak option
values in programmatically, overriding or supplementing
user-supplied values from the config files and command line.
You'll have to re-finalize the command object (by calling
'finalize_options()' or 'ensure_finalized()') before using it for
real.

'command' should be a command name (string) or command object.  If
'reinit_subcommands' is true, also reinitializes the command's
sub-commands, as declared by the 'sub_commands' class attribute (if
it has one).  See the "install" command for an example.  Only
reinitializes the sub-commands that actually matter, ie. those
whose test predicates return true.

Returns the reinitialized command object.
r   r   F)r   r   r   r:  r>  	finalizedinitialize_optionsrb   r7  get_sub_commandsreinitialize_command)rl   rq   reinit_subcommandsr   rA  subs         r"   rL  !Distribution.reinitialize_command  s    & 	*'++"L**<8G"335L  N""$!&+l#!!'*//1))#B 2 r$   c                 0    [         R                   " X!5        g Nr   )rl   r!   levels      r"   r   Distribution.announce  s    r$   c                 L    U R                    H  nU R                  U5        M     g)zRun each command that was seen on the setup script command line.
Uses the list of commands found and cache of command objects
created by 'get_command_obj()'.
N)r   run_command)rl   r  s     r"   run_commandsDistribution.run_commands  s     
 ==CS! !r$   c                     U R                   R                  U5      (       a  g[        R                  " SU5        U R	                  U5      nUR                  5         UR                  5         SU R                   U'   g)az  Do whatever it takes to run a command (including nothing at all,
if the command has already been run).  Specifically: if we have
already created and run the command named by 'command', return
silently without doing anything.  If the command named by 'command'
doesn't even have a command object yet, create one.  Then invoke
'run()' on that command object (or an existing one).
Nz
running %sT)rb   rc   r	   infor:  ensure_finalizedrun)rl   rq   r9  s      r"   rU  Distribution.run_command  s]     ==W%%w'&&w/  "!%gr$   c                 j    [        U R                  =(       d    U R                  =(       d    / 5      S:  $ Nr   )r   rT   rW   r   s    r"   has_pure_modulesDistribution.has_pure_modules  s$    4==9DOO9r:Q>>r$   c                 X    U R                   =(       a    [        U R                   5      S:  $ r^  )rZ   r   r   s    r"   has_ext_modulesDistribution.has_ext_modules  s#    =C(8(8$9A$==r$   c                 X    U R                   =(       a    [        U R                   5      S:  $ r^  )rX   r   r   s    r"   has_c_librariesDistribution.has_c_libraries  s    ~~9#dnn"5"99r$   c                 P    U R                  5       =(       d    U R                  5       $ rQ  )r_  rb  r   s    r"   has_modulesDistribution.has_modules  s    $$&@$*>*>*@@r$   c                 X    U R                   =(       a    [        U R                   5      S:  $ r^  )rY   r   r   s    r"   has_headersDistribution.has_headers      ||5DLL 1A 55r$   c                 X    U R                   =(       a    [        U R                   5      S:  $ r^  )r^   r   r   s    r"   has_scriptsDistribution.has_scripts  rm  r$   c                 X    U R                   =(       a    [        U R                   5      S:  $ r^  )r_   r   r   s    r"   has_data_filesDistribution.has_data_files  s    ;3t#7!#;;r$   c                     U R                  5       =(       a1    U R                  5       (       + =(       a    U R                  5       (       + $ rQ  )r_  rb  re  r   s    r"   is_pureDistribution.is_pure  s;    !!# +((**+((**	
r$   )rN   ra   rR   rO   r   r_   rS   rG   rZ   r[   r]   rb   rY   r-   r\   rX   rK   rU   rV   rT   r`   rW   rQ   rP   r^   r(   ri   rQ  )NNrC   )TTr   )T)F).r   
__module____qualname____firstlineno____doc__r   r  r   r   rH   r   rx   re   r   r   r   r   r   r   r   rk   r   r   r   r  r  r&  r,  r   r:  r7  rL  r   INFOr   rV  rU  r_  rb  re  rh  rk  ro  rr  ru  __static_attributes__).0xr   s   000r"   r&   r&   4   s   *NLO6 >MM_-ad3_M Y'LY v	84.?&@4HAF
`D4 WY1+KS1+f%#NA"R2<
$CL:(0T&T #*,, "&(?>:A66<
a Ns   B9r&   c                       \ rS rSrSrSrS)S jrS rS rS r	S	 r
S
 rS rS r\S\S\S\4S j5       rS rS rS rS rS rS rS rS r\rS rS rS rS rS rS rS r S  r!S! r"S" r#S# r$S$ r%S% r&S& r'S' r(S(r)g)*rJ   i  zUDummy class to hold the distribution meta-data: name, version,
author, and so forth.
)r/   r0   r3   author_emailr5   maintainer_emailr7   r8   r:   long_descriptionr=   r;   r2   r6   contact_emailr<   download_urlr>   r?   r@   Nc                 .   Ub  U R                  [        U5      5        g S U l        S U l        S U l        S U l        S U l        S U l        S U l        S U l	        S U l
        S U l        S U l        S U l        S U l        S U l        S U l        S U l        S U l        g rQ  )read_pkg_fileopenr/   r0   r3   r  r5   r  r7   r8   r:   r  r=   r;   r<   r  r>   r?   r@   )rl   r   s     r"   rx   DistributionMetadata.__init__  s    tDz*DIDLDK $D"DO$(D!DHDL#D$(D! DM!DN#D $D DM DM!DNr$   c                 x  ^ [        U5      mU4S jnU4S jnTS   nU" S5      U l        U" S5      U l        U" S5      U l        U" S5      U l        SU l        U" S	5      U l        SU l        U" S
5      U l        U" S5      U l	        ST;   a  U" S5      U l
        OSU l
        U" S5      U l        U" S5      U l        ST;   a  U" S5      R                  S5      U l        U" S5      U l        U" S5      U l        US:X  a(  U" S5      U l        U" S5      U l        U" S5      U l        gSU l        SU l        SU l        g)z-Reads the metadata values from a file object.c                 0   > TU    nU(       a	  US:w  a  U$ g g NUNKNOWNr   )r/   r   r!   s     r"   _read_field7DistributionMetadata.read_pkg_file.<locals>._read_field.  s"    IE)+ ,ur$   c                 :   > TR                  U S 5      nU/ :X  a  g U$ rQ  )get_all)r/   valuesr!   s     r"   
_read_list6DistributionMetadata.read_pkg_file.<locals>._read_list3  s"    [[t,F|Mr$   zmetadata-versionr/   r0   summaryr3   Nr4   z	home-pager8   zdownload-urlr:   r=   r   platform
classifier1.1r?   r>   r@   )r   r/   r0   r:   r3   r5   r  r  r7   r8   r  r  r   r=   r;   r<   r?   r>   r@   )rl   filer  r  metadata_versionr!   s        @r"   r  "DistributionMetadata.read_pkg_file*  s<   %	
	 12'	"9-&y1!(+'7 ${+"9-S  +N ;D $D +M :&y1'
399#>DM#J/%l3 u$&z2DM&z2DM'4DN DM DM!DNr$   c                     [        [        R                  R                  US5      SSS9 nU R	                  U5        SSS5        g! , (       d  f       g= f)z.Write the PKG-INFO file into the release tree.zPKG-INFOwzUTF-8r   N)r  r   r   r   write_pkg_file)rl   base_dirpkg_infos      r"   write_pkg_info#DistributionMetadata.write_pkg_info]  sA    GGLL:.g
)
 
 
s   A
Ac                 n  ^ SnU R                   (       dD  U R                  (       d3  U R                  (       d"  U R                  (       d  U R                  (       a  SnTR                  SU S35        TR                  SU R                  5        S35        TR                  SU R                  5        S35        U4S jnU" SU R                  5       5        U" S	U R                  5       5        U" S
U R                  5       5        U" SU R                  5       5        U" SU R                  5       5        U" SU R                  5        U" S[        U R                  5       =(       d    S5      5        U" SSR                  U R!                  5       5      5        U R#                  TSU R%                  5       5        U R#                  TSU R'                  5       5        U R#                  TSU R)                  5       5        U R#                  TSU R+                  5       5        U R#                  TSU R-                  5       5        g)z0Write the PKG-INFO format data to a file object.z1.0r  zMetadata-Version: r   zName: z	Version: c                 D   > U(       a  TR                  U  SU S35        g g Nz: r   write)r   ru   r  s     r"   maybe_write8DistributionMetadata.write_pkg_file.<locals>.maybe_writeu  s$    

fXRuB/0 r$   Summaryz	Home-pageAuthorzAuthor-emailLicensezDownload-URLDescriptionrC   Keywordsr   Platform
ClassifierRequiresProvides	ObsoletesN)r>   r?   r@   r<   r  r  get_nameget_versionget_descriptionget_urlget_contactget_contact_emailget_licenser   get_long_descriptionr   get_keywords_write_listget_platformsget_classifiersget_requiresget_providesget_obsoletes)rl   r  r0   r  s    `  r"   r  #DistributionMetadata.write_pkg_filed  s   MM}}~~  G 	

'y34

VDMMO,B/0

Yt//12"56	1
 	It3356K0Hd..01ND$:$:$<=It//12ND$5$56M=1J1J1L1RPR#STJ):):)< =>z4+=+=+?@|T-A-A-CD 	z4+<+<+>?z4+<+<+>?{D,>,>,@Ar$   c                 Z    U=(       d    / nU H  nUR                  U SU S35        M     g r  r  )rl   r  r/   r  r   s        r"   r   DistributionMetadata._write_list  s.    2EJJ$r%+, r$   c                 ,    U R                   =(       d    S$ r  )r/   r   s    r"   r  DistributionMetadata.get_name  s    yy%I%r$   c                 ,    U R                   =(       d    S$ )Nz0.0.0)r0   r   s    r"   r   DistributionMetadata.get_version  s    ||&w&r$   c                 ^    U R                  U R                  5       U R                  5       5      $ rQ  )	_fullnamer  r  r   s    r"   get_fullname!DistributionMetadata.get_fullname  s"    ~~dmmot/?/?/ABBr$   r/   r0   returnc                 h    SR                  [        U 5      R                  SS5      [        USS95      $ )a  
>>> DistributionMetadata._fullname('setup.tools', '1.0-2')
'setup_tools-1.0.post2'
>>> DistributionMetadata._fullname('setup-tools', '1.2post2')
'setup_tools-1.2.post2'
>>> DistributionMetadata._fullname('setup-tools', '1.0-r2')
'setup_tools-1.0.post2'
>>> DistributionMetadata._fullname('setup.tools', '1.0.post')
'setup_tools-1.0.post0'
>>> DistributionMetadata._fullname('setup.tools', '1.0+ubuntu-1')
'setup_tools-1.0+ubuntu.1'
z{}-{}rF   r   F)strip_trailing_zero)r   r   r   r   )r/   r0   s     r"   r  DistributionMetadata._fullname  s4     ~~d#++C5 eD
 	
r$   c                     U R                   $ rQ  )r3   r   s    r"   
get_authorDistributionMetadata.get_author  s    {{r$   c                     U R                   $ rQ  )r  r   s    r"   get_author_email%DistributionMetadata.get_author_email         r$   c                     U R                   $ rQ  )r5   r   s    r"   get_maintainer#DistributionMetadata.get_maintainer  s    r$   c                     U R                   $ rQ  )r  r   s    r"   get_maintainer_email)DistributionMetadata.get_maintainer_email      $$$r$   c                 @    U R                   =(       d    U R                  $ rQ  )r5   r3   r   s    r"   r   DistributionMetadata.get_contact  s    -$++-r$   c                 @    U R                   =(       d    U R                  $ rQ  )r  r  r   s    r"   r  &DistributionMetadata.get_contact_email  s    $$9(9(99r$   c                     U R                   $ rQ  )r7   r   s    r"   r  DistributionMetadata.get_url  s    xxr$   c                     U R                   $ rQ  )r8   r   s    r"   r   DistributionMetadata.get_license  s    ||r$   c                     U R                   $ rQ  )r:   r   s    r"   r  $DistributionMetadata.get_description  s    r$   c                     U R                   $ rQ  )r  r   s    r"   r  )DistributionMetadata.get_long_description  r  r$   c                 ,    U R                   =(       d    / $ rQ  )r=   r   s    r"   r  !DistributionMetadata.get_keywords      }}""r$   c                 &    [        US5      U l        g )Nr=   )r#   r=   rl   r   s     r"   set_keywords!DistributionMetadata.set_keywords  s    $UJ7r$   c                     U R                   $ rQ  )r;   r   s    r"   r  "DistributionMetadata.get_platforms  s    ~~r$   c                 &    [        US5      U l        g )Nr;   )r#   r;   r  s     r"   set_platforms"DistributionMetadata.set_platforms  s    %e[9r$   c                 ,    U R                   =(       d    / $ rQ  )r<   r   s    r"   r  $DistributionMetadata.get_classifiers  s    %2%r$   c                 &    [        US5      U l        g )Nr<   )r#   r<   r  s     r"   set_classifiers$DistributionMetadata.set_classifiers  s    '}=r$   c                     U R                   $ rQ  )r  r   s    r"   get_download_url%DistributionMetadata.get_download_url  r  r$   c                 ,    U R                   =(       d    / $ rQ  )r?   r   s    r"   r  !DistributionMetadata.get_requires  r  r$   c                 t    SS K nU H  nUR                  R                  U5        M      [        U5      U l        g r^  )distutils.versionpredicateversionpredicateVersionPredicater   r?   rl   r   r   r)   s       r"   set_requires!DistributionMetadata.set_requires  s.    )A&&77: Ur$   c                 ,    U R                   =(       d    / $ rQ  )r>   r   s    r"   r  !DistributionMetadata.get_provides  r  r$   c                     U Vs/ sH  o"R                  5       PM     nnU H"  nSS KnUR                  R                  U5        M$     Xl        g s  snf r^  )r   r  r  split_provisionr>   )rl   r   r)   r   s       r"   set_provides!DistributionMetadata.set_provides  sG    $)*EqE*A-&&66q9   +s   Ac                 ,    U R                   =(       d    / $ rQ  )r@   r   s    r"   r  "DistributionMetadata.get_obsoletes  s    ~~##r$   c                 t    SS K nU H  nUR                  R                  U5        M      [        U5      U l        g r^  )r  r  r  r   r@   r  s       r"   set_obsoletes"DistributionMetadata.set_obsoletes  s.    )A&&77: er$   )r3   r  r<   r:   r  r=   r8   r  r5   r  r/   r@   r;   r>   r?   r7   r0   rQ  )*r   rw  rx  ry  rz  rL   rx   r  r  r  r  r  r  r  staticmethodr   r  r  r  r  r  r  r  r  r  get_licencer  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r|  r   r$   r"   rJ   rJ     s    0".1"f*%BN-&'C 
 
c 
c 
 
$!%.: K %#8:&>!#$#$%r$   rJ   c                 4    U  Vs/ sH  oSS PM	     sn$ s  snf )zwConvert a 4-tuple 'help_options' list as found in various command
classes to the 3-tuple form required by FancyGetopt.
r      r   )rD   rt   s     r"   r   r     s      !((!H(((s   )%rz  r   r   r   r   rer   rf   collections.abcr   emailr   packaging.utilsr   r   _logr	   debugr
   errorsr   r   r   r   fancy_getoptr   r   utilr   r   r   compiler   r#   r&   rJ   r   r   r$   r"   <module>r!     sz      	  	 
  $ # C    9 9 9 ZZ45
x
 x
DK% K%\)r$   