
    =Og                         	 d dl Z d dlZd dlZd dlmZ 	 d dlZn# e$ r dZY nw xY wd dlT d dlm	Z	m
Z
 d dlmZmZmZ d dlmZ d dlmZ  ej        d          Zd	 Z G d
 d          Z G d d          Zd ZdS )    N)message_from_file)*)FancyGetopttranslate_longopt)check_environ	strtoboolrfc822_escapelog)DEBUGz^[a-zA-Z]([a-zA-Z0-9_]*)$c                     t          | t                    rn`t          | t                    sKt          |           j        }d| d| d}t          j        t
          j        |           t          |           } | S )Nz
Warning: 'z' should be a list, got type '')
isinstancestrlisttype__name__r   WARN)value	fieldnametypenamemsgs       '/usr/lib64/python3.11/distutils/dist.py_ensure_listr      su    % 	 	t$$ ;;'O9OOHOOO#UL    c                      e Zd Z	 g dZdZg dZd eD             ZddiZd)dZd	 Z	d*dZ
d Zd)dZd Zd Zd Zd Zddg fdZd Zd Zd Zd Zd Zd Zd+dZd)dZd,dZej        fdZd Zd  Zd! Z d" Z!d# Z"d$ Z#d% Z$d& Z%d' Z&d( Z'dS )-Distribution))verbosevzrun verbosely (default)   )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 obsoletec                 8    g | ]}t          |d                    S r   r   ).0xs     r   
<listcomp>zDistribution.<listcomp>   s%    MMM-ad33MMMr   r!   r   Nc           	         	 d| _         d| _        d| _        | j        D ]}t	          | |d           t                      | _        | j        j        D ]+}d|z   }t	          | |t          | j        |                     ,i | _	        d | _
        d | _        d | _        i | _        g | _        d | _        i | _        d | _        d | _        d | _        d | _        d | _        d | _        d | _        d | _        d | _        d | _        d| _        i | _        i | _        |r|                    d          }|S|d= |                                D ];\  }}|                      |          }|                                D ]\  }	}
d|
f||	<   <d|v rN|d         |d<   |d= d	}tB          tC          j"        |           n"tF          j$        %                    |d
z              |                                D ]\  }}
tM          | j        d|z             r" t          | j        d|z             |
           ?tM          | j        |          rt	          | j        ||
           ktM          | |          rt	          | ||
           dtO          |          z  }tC          j"        |           d| _(        | j        0| j        D ](}|)                    d          s n|dk    r	d| _(         n)| *                                 d S )Nr    r   get_ optionszsetup scriptr0   r/   z:'licence' distribution option is deprecated; use 'license'
set_zUnknown distribution option: %sT-z--no-user-cfgF)+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sysstderrwritehasattrreprwant_user_cfg
startswithfinalize_options)selfattrsattrbasenamemethod_namerA   commandcmd_optionsopt_dictoptvalr   keyargs                 r   __init__zDistribution.__init__   sn   	 	- 	# 	#DD$"""" -..7 	L 	LH 8+KD+wt}k'J'JKKKK  !%
    " 
      !	'
 ii	**G")$.5mmoo > >*Wk#33G<<H&1&7&7&9&9 > >
c)7(=> E!!#(#3i )$R'M#&&&&J$$S4Z000 $kkmm 	' 	'
c4=&3,77 '8GDM6C<88====T]C00 'DM34444T3'' 'D#s++++;d3iiGCM#&&&& "''  ~~c** E/))).D&E * 	r   c                 X    	 | j                             |          }|i x}| j         |<   |S N)rP   ra   )rn   rs   dicts      r   rc   zDistribution.get_option_dict&  s;    	
 #''00<355D4'0r   r@   c                    ddl m} |&t          | j                                                  }||                     ||z              |dz   }|s|                     |dz              d S |D ]}| j                            |          }||                     |d|z  z              :|                     |d|z  z               ||          }|                    d          D ]}|                     |dz   |z              d S )Nr   )pformatz  zno commands known yetzno option dict for '%s' commandzoption dict for '%s' command:rB   )pprintr   sortedrP   keysannouncera   split)	rn   headercommandsindentr   cmd_nameru   outlines	            r   dump_option_dictszDistribution.dump_option_dicts1  sZ   """"""d27799::HMM&6/***d]F 	MM&#::;;;F  
	8 
	8H+//99Hf?(JK L L L L f=HI J J Jgh''IIdOO 8 8DMM&4-$"677778
	8 
	8r   c                 "   	 g }t                       t          j                            t          j        d         j                  }t          j                            |d          }t          j                            |          r|	                    |           t          j
        dk    rd}nd}| j        rqt          j                            t          j                            d          |          }t          j                            |          r|	                    |           d}t          j                            |          r|	                    |           t          r+|                     dd	                    |          z             |S )
N	distutilszdistutils.cfgposixz.pydistutils.cfgzpydistutils.cfg~z	setup.cfgzusing config files: %sz, )r   ospathdirnamerf   modules__file__joinisfileappendr&   rk   
expanduserr   r   )rn   filessys_dirsys_fileuser_filename	user_file
local_files          r   find_config_fileszDistribution.find_config_filesM  sK   	  '//#+k":"CDD 7<<997>>(## 	#LL""" 7g.MM-M  	(RW%7%7%<%<mLLIw~~i(( (Y''' !
7>>*%% 	%LL$$$ 	GMM2TYYu5E5EEFFFr   c                    ddl m} t          j        t          j        k    rg d}ng }t          |          }||                                 }t          r|                     d            |            }|D ]}t          r|                     d|z             |	                    |           |
                                D ]n}|                    |          }|                     |          }|D ]?}	|	dk    r7|	|vr3|                    ||	          }
|	                    dd          }	||
f||	<   @o|                                 d	| j        v r| j        d	                                         D ]\  }	\  }}
| j                            |	          }	 |r t'          | |t)          |
                      n4|	d
v rt'          | |	t)          |
                     nt'          | |	|
           z# t*          $ r}t-          |          d }~ww xY wd S d S )Nr   )ConfigParser)zinstall-basezinstall-platbasezinstall-libzinstall-platlibzinstall-purelibzinstall-headerszinstall-scriptszinstall-dataprefixzexec-prefixhomeuserrootz"Distribution.parse_config_files():z  reading %sr   rD   _global)r   rE   )configparserr   rf   r   base_prefix	frozensetr   r   r   readsectionsrA   rc   ra   replacerz   rP   rb   negative_optrG   r   
ValueErrorDistutilsOptionError)rn   	filenamesr   ignore_optionsparserfilenamesectionrA   ru   rv   rw   srcaliasr   s                 r   parse_config_fileszDistribution.parse_config_files}  so   ------ :((( ( (NN  N">22..00I 	@MM>???! 	 	H 9nx7888KK!!!!??,, 8 8 ..11//88" 8 8Cj((S-F-F$jj55!kk#s33)13	8 OO
 t+++%)%9(%C%I%I%K%K 
4 
4!jsC)--c224 0e3-?@@@@ 666c9S>>::::c3///! 4 4 4.s3334 ,+
4 
4s   AG%%
H/G>>Hc                 n   	 |                                  }g | _        t          || j        z             }|                    | j                   |                    ddi           |                    | j        |           }|	                                }t          j        | j                   |                     |          rd S |r|                     ||          }|d S || j        r5|                     |t#          | j                  dk    | j                   d S | j        st%          d          dS )Nr0   r/   )argsobjectr   display_optionsr   zno commands suppliedT)_get_toplevel_optionsr   r   r   set_negative_aliasesr   set_aliasesgetoptrO   get_option_orderr   set_verbosityr   handle_display_options_parse_command_optsr$   
_show_helplenDistutilsArgError)rn   toplevel_optionsr   r   option_orders        r   parse_command_linezDistribution.parse_command_line  s]   	,  5577 -0DDEE##D$5666Iy1222}}$"24}@@..00$,''' &&|44 	F 	++FD99D|  	 9 	OOF,/,>,>!,C%)]  4 4 4 F } 	<#$:;;; tr   c                     	 | j         dgz   S )N)zcommand-packages=Nz0list of packages that provide distutils commands)global_optionsrn   s    r   r   z"Distribution._get_toplevel_options  s$    	
 "A&  	r   c                    	 ddl m} |d         }t                              |          st	          d|z            | j                            |           	 |                     |          }n!# t          $ r}t          |          d }~ww xY wt          ||          st          d|z            t          |d          rt          |j        t                    sd}t          ||z            | j        }t          |d          r.|                                }|                    |j                   t          |d          r/t          |j        t                    rt)          |j                  }ng }|                    | j        |j        z   |z              |                    |           |                    |d	d                    \  }}	t          |	d
          r"|	j        r|                     |d|g           d S t          |d          rt          |j        t                    rjd}
|j        D ]\\  }}}}t          |	|                    |                    r2d	}
t9          |          r |             Ft          d|d|d          ]|
rd S |                     |          }t=          |	                                          D ]\  }}d|f||<   |S )Nr   Commandzinvalid command name '%s'z&command class %s must subclass Commanduser_optionszIcommand class %s must provide 'user_options' attribute (a list of tuples)r   help_optionsr    r$   r   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   r   get_command_classDistutilsModuleErrorr   
issubclassDistutilsClassErrorri   r   r   r   r   copyupdater   fix_help_optionsset_option_tabler   r   r   r$   r   get_attr_namecallablerc   varsrb   )rn   r   r   r   rs   	cmd_classr   r   r   optshelp_option_foundhelp_optionshortdescfuncru   r&   r   s                     r   r   z Distribution._parse_command_opts  sZ   	 	*))))) q'(( 	D87BCCCW%%%
	)..w77II# 	) 	) 	)#C(((	)
 )W-- 	F%89DF F F
 	>22 	791488	7>C%cIo666 (9n-- 	8',,..L	 6777 I~.. 	91488	+I,BCCLLL 	 3 ) 6!7 ,!- 	. 	. 	. 	##L111}}T!""X..t4   	TY 	OOFAOLLLFI~.. 	91488	4=4J 	3 	30eT44!5!5k!B!BCC 3&'%~~ 311  $tt[[[23 3 33 !  ''00!$ZZ--// 	5 	5MT5,e4HTNNs   A- -
B7BBc                     	 dD ]d}t          | j        |          }|t          |t                    r5d |                    d          D             }t          | j        ||           ed S )Nr4   r2   c                 6    g | ]}|                                 S  strip)r;   elms     r   r=   z1Distribution.finalize_options.<locals>.<listcomp>j  s     AAAAAAr   ,)rK   rI   r   r   r   rG   )rn   rp   r   s      r   rm   zDistribution.finalize_options`  s    	 . 	4 	4DDM400E}%%% 4AAC0@0@AAAtU333	4 	4r   r    c                 j   	 ddl m} ddlm} |r_|r|                                 }n| j        }|                    |           |                    | j        dz              t          d           |r>|                    | j
                   |                    d           t          d           | j        D ]}t          |t                    rt          ||          r|}	n|                     |          }	t!          |	d          rJt          |	j        t$                    r0|                    |	j        t)          |	j                  z              n|                    |	j                   |                    d|	j        z             t          d           t           || j                             d S )	Nr   	gen_usager   z
Global options:r@   zKInformation display options (just display information, ignore any commands)r   zOptions for '%s' command:)distutils.corer   r   r   r   r   r   
print_helpcommon_usageprintr   r   r   r   r   r   ri   r   r   r   r   r   rN   )
rn   r   r   r   r   r   r   rA   rs   klasss
             r   r   zDistribution._show_helpm  s   	 	-,,,,,)))))) 	 .4466-##G,,,d/2EEFFF"III 	##D$899945 5 5 "III} 	 	G'4(( 8Z-I-I 8..w77~.. <u1488<''(:(89K(L(L)M N N N N ''(:;;;9ENJKKK"IIIIii())*****r   c                 2   	 ddl m} | j        rB|                                  t	          d           t	           || j                             dS d}i }| j        D ]}d||d         <   |D ]\  }}|r|                    |          rt          |          } t          | j
        d|z                         }|dv r#t	          d                    |                     n6|dv r#t	          d	                    |                     nt	          |           d}|S )
Nr   r   r@   r    r?   r   r   )r3   r5   r6   r7   rB   )r   r   help_commandsprint_commandsr   rN   r   ra   r   rK   rI   r   )	rn   r   r   any_display_optionsis_display_optionoptionrv   rw   r   s	            r   r   z#Distribution.handle_display_options  s`   	
 	-,,,,,
  	!!!"III))D,--...1
  * 	- 	-F+,fQi((& 	( 	(JS# 
((,,S11 
(',,:vcz::<<333#((5//**** * * *$))E**++++%LLL&'#""r   c                     	 t          |dz              |D ]c}| j                            |          }|s|                     |          }	 |j        }n# t
          $ r d}Y nw xY wt          d|||fz             dd S )N:(no description available)z
  %-*s  %s)r   rL   ra   r   r1   AttributeError)rn   r   r   
max_lengthcmdr   r1   s          r   print_command_listzDistribution.print_command_list  s    	 	fsl 		A 		ACM%%c**E 4..s33;#/! ; ; ;:; ,*c;!??@@@@		A 		As   
AA! A!c                    	 dd l }|j        j        }i }|D ]}d||<   g }| j                                        D ],}|                    |          s|                    |           -d}||z   D ]$}t          |          |k    rt          |          }%|                     |d|           |r't                       |                     |d|           d S d S )Nr   r    zStandard commandszExtra commands)
distutils.commandrs   __all__rL   r   ra   r   r   r  r   )rn   r   std_commandsis_stdr  extra_commandsr  s          r   r   zDistribution.print_commands  s%   	 	!    (0 	 	CF3KK=%%'' 	+ 	+C::c?? +%%c***
 >1 	& 	&C3xx*$$ XX
 3 *	, 	, 	,  	0GGG##N$4$.0 0 0 0 0	0 	0r   c                    	 dd l }|j        j        }i }|D ]}d||<   g }| j                                        D ],}|                    |          s|                    |           -g }||z   D ]e}| j                            |          }|s|                     |          }	 |j        }n# t          $ r d}Y nw xY w|                    ||f           f|S )Nr   r    r  )
r  rs   r	  rL   r   ra   r   r   r1   r  )	rn   r   r
  r  r  r  rvr   r1   s	            r   get_command_listzDistribution.get_command_list  s#   	 	!    (0 	 	CF3KK=%%'' 	+ 	+C::c?? +%%c*** >1 	* 	*CM%%c**E 4..s33;#/! ; ; ;:;IIsK())))	s   !B))B87B8c                     	 | j         }t          |t                    sD|d}d |                    d          D             }d|vr|                    dd           || _         |S )Nr@   c                 B    g | ]}|d k    |                                 S )r@   r   )r;   pkgs     r   r=   z5Distribution.get_command_packages.<locals>.<listcomp>!  s%    HHHCcRiiCIIKKiiir   r   zdistutils.commandr   )rM   r   r   r   insert)rn   pkgss     r   get_command_packagesz!Distribution.get_command_packages  ss    G$$%% 	)|HH4::c??HHHD"$..A2333$(D!r   c                    	 | j                             |          }|r|S |                                 D ]}|d|}|}	 t          |           t          j        |         }n# t          $ r Y :w xY w	 t          ||          }n'# t          $ r t          d|d|d|d          w xY w|| j         |<   |c S t          d|z            )N.zinvalid command 'z' (no class 'z' in module 'z')zinvalid command '%s')
rL   ra   r  
__import__rf   r   ImportErrorrK   r  r   )rn   rs   r   pkgnamemodule_name
klass_namemodules          r   r   zDistribution.get_command_class'  s%   
	 !!'** 	L0022 	 	G%,WWgg6K J;'''[1   :
33! : : :**ww


KKK9: : ::
 &+DM'"LLL"#9G#CDDDs    !A""
A/.A/3B$B(c                 N   	 | j                             |          }|s|rt          r|                     d|z             |                     |          } ||           x}| j         |<   d| j        |<   | j                            |          }|r|                     ||           |S )Nz<Distribution.get_command_obj(): creating '%s' command objectr   )r_   ra   r   r   r   r`   rP   _set_command_options)rn   rs   createcmd_objr   rA   s         r   get_command_objzDistribution.get_command_objM  s    	
 "&&w// 	<6 	< H =?FG H H H **733E27%++=Gd&w/%&DM'" *..w77G <))'7;;;r   c           
      ,   	 |                                 }||                     |          }t          r|                     d|z             |                                D ]2\  }\  }}t          r|                     d|d|d|d           	 d |j        D             }n# t          $ r g }Y nw xY w	 |j        }n# t          $ r i }Y nw xY w	 t          |t                    }	||v r(|	r&t          |||         t          |                      n`||v r!|	rt          ||t          |                     n;t          ||          rt          |||           nt          d|d|d	|d
          # t          $ r}
t          |
          d }
~
ww xY wd S )Nz#  setting options for '%s' command:z    z = z (from )c                 ,    g | ]}t          |          S r   r:   )r;   os     r   r=   z5Distribution._set_command_options.<locals>.<listcomp>|  s6     C C C!" /q11 C C Cr   z	error in z: command 'z' has no such option 'r   )get_command_namerc   r   r   rb   boolean_optionsr  r   r   r   rG   r   ri   r   r   )rn   r_   option_dictcommand_namer   sourcer   	bool_optsneg_opt	is_stringr   s              r   r  z!Distribution._set_command_optionsh  s<   	 #3355..|<<K 	PMM?,NOOO)4):):)<)< 	0 	0%V_fe B9?A B B BC C&1&AC C C		!   			%2!   0&uc22	W$$$Ki>N>N:NOOOOy((Y(K51A1ABBBB[&11 :K7777..!66<<<9: : :  0 0 0*3///05	0 	0s=   B""B10B15B==CCB!E33
F=FFr   c                 p   	 ddl m} t          ||          s|}|                     |          }n|                                }|j        s|S |                                 d|_        d| j        |<   |                     |           |r-|	                                D ]}| 
                    ||           |S )Nr   r   )r   r   r   r"  r'  	finalizedinitialize_optionsr`   r  get_sub_commandsreinitialize_command)rn   rs   reinit_subcommandsr   r*  subs         r   r3  z!Distribution.reinitialize_command  s    	$ 	*)))))'7++ 	6"L**<88GG"3355L  	N""$$$&'l#!!'*** 	C//11 C C))#/ABBBBr   c                 0    t          j         ||           d S r|   r
   )rn   r   levels      r   r   zDistribution.announce  s    sr   c                 F    	 | j         D ]}|                     |           d S r|   )r   run_command)rn   r  s     r   run_commandszDistribution.run_commands  s;    	 = 	" 	"CS!!!!	" 	"r   c                     	 | j                             |          rd S t          j        d|           |                     |          }|                                 |                                 d| j         |<   d S )Nz
running %sr    )r`   ra   r   infor"  ensure_finalizedrun)rn   rs   r!  s      r   r9  zDistribution.run_command  s|    	 =W%% 	Fw'''&&w//  """!"gr   c                 D    t          | j        p| j        pg           dk    S Nr   )r   rR   rU   r   s    r   has_pure_moduleszDistribution.has_pure_modules  s#    4=9DO9r::Q>>r   c                 @    | j         ot          | j                   dk    S r@  )rX   r   r   s    r   has_ext_moduleszDistribution.has_ext_modules  s     =C(8$9$9A$==r   c                 @    | j         ot          | j                   dk    S r@  )rV   r   r   s    r   has_c_librarieszDistribution.has_c_libraries  s    ~9#dn"5"5"99r   c                 R    |                                  p|                                 S r|   )rA  rC  r   s    r   has_moduleszDistribution.has_modules  s%    $$&&@$*>*>*@*@@r   c                 @    | j         ot          | j                   dk    S r@  )rW   r   r   s    r   has_headerszDistribution.has_headers      |5DL 1 1A 55r   c                 @    | j         ot          | j                   dk    S r@  )r\   r   r   s    r   has_scriptszDistribution.has_scripts  rJ  r   c                 @    | j         ot          | j                   dk    S r@  )r]   r   r   s    r   has_data_fileszDistribution.has_data_files  s    ;3t#7#7!#;;r   c                 ~    |                                  o)|                                  o|                                  S r|   )rA  rC  rE  r   s    r   is_purezDistribution.is_pure  sD    %%'' +((***+((***	,r   r|   )NNr@   )r    r9   )(r   
__module____qualname__r   r   r   rF   r   rz   rc   r   r   r   r   r   r   rm   r   r   r  r   r  r  r   r"  r  r3  r   INFOr   r:  r9  rA  rC  rE  rG  rI  rL  rN  rP  r   r   r   r   r   ,   s       *  NL+
 +
 +
OX NM_MMM Y'L\  \  \  \ |	 	 	8 8 8 88. . .`64 64 64 64tA A AF	 	 	Y Y Yv4 4 4 1210+ 0+ 0+ 0+d&# &# &#PA A A"0 0 0B  D
 
 
$E $E $EL   6*0 *0 *0 *0X% % % %R #&(    " " "# # #(? ? ?> > >: : :A A A6 6 66 6 6< < <, , , , ,r   r   c                       e Zd Z	 dZd"dZd Zd Zd Zd Zd Z	d	 Z
d
 Zd Zd Zd Zd Zd Zd Zd Zd ZeZd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Z d Z!d  Z"d! Z#dS )#rH   )r&   r'   r*   author_emailr,   maintainer_emailr.   r/   r1   long_descriptionr4   r2   r)   r-   contact_emailr3   download_urlr5   r6   r7   Nc                 @   |$|                      t          |                     d S d | _        d | _        d | _        d | _        d | _        d | _        d | _        d | _	        d | _
        d | _        d | _        d | _        d | _        d | _        d | _        d | _        d | _        d S r|   )read_pkg_fileopenr&   r'   r*   rU  r,   rV  r.   r/   r1   rW  r4   r2   r3   rY  r5   r6   r7   )rn   r   s     r   rz   zDistributionMetadata.__init__  s    tDzz*****DIDLDK $D"DO$(D!DHDL#D$(D! DM!DN#D $D DM DM!DNNNr   c                    	 t          |          fd}fd}d         } |d          | _         |d          | _         |d          | _         |d          | _        d | _         |d          | _        d | _         |d	          | _         |d
          | _	        dv r |d          | _
        nd | _
         |d          | _         |d          | _        dv r# |d                              d          | _         |d          | _         |d          | _        |dk    r2 |d          | _         |d          | _         |d          | _        d S d | _        d | _        d | _        d S )Nc                 (    |          }|dk    rd S |S NUNKNOWNr   )r&   r   r   s     r   _read_fieldz7DistributionMetadata.read_pkg_file.<locals>._read_field(  s!    IE	!!tLr   c                 D                         | d           }|g k    rd S |S r|   )get_all)r&   valuesr   s     r   
_read_listz6DistributionMetadata.read_pkg_file.<locals>._read_list.  s)    [[t,,F||tMr   zmetadata-versionr&   r'   summaryr*   r+   z	home-pager/   zdownload-urlr1   r4   r   platform
classifier1.1r6   r5   r7   )r   r&   r'   r1   r*   r,   rU  rV  r.   r/   rY  rW  r   r4   r2   r3   r6   r5   r7   )rn   filera  re  metadata_versionr   s        @r   r[  z"DistributionMetadata.read_pkg_file$  s   ;%%	 	 	 	 		 	 	 	 	 12K''	"{9--&;y11!k(++'K77 $;{++"{9--S   +N ; ;D $D +M : :&;y11'K
3399#>>DM#J//%:l33 u$$&Jz22DM&Jz22DM'Z44DNNN DM DM!DNNNr   c                     	 t          t          j                            |d          dd          5 }|                     |           d d d            d S # 1 swxY w Y   d S )NzPKG-INFOwzUTF-8)encoding)r\  r   r   r   write_pkg_file)rn   base_dirpkg_infos      r   write_pkg_infoz#DistributionMetadata.write_pkg_infoX  s    	"',,x44c"$ $ $ 	*'/)))	* 	* 	* 	* 	* 	* 	* 	* 	* 	* 	* 	* 	* 	* 	* 	* 	* 	*s   AAAc                    	 d}| j         s| j        s| j        s| j        s| j        rd}|                    d|z             |                    d|                                 z             |                    d|                                 z             |                    d|                                 z             |                    d| 	                                z             |                    d| 
                                z             |                    d	|                                 z             |                    d
|                                 z             | j        r|                    d| j        z             t          |                                           }|                    d|z             d                    |                                           }|r|                    d|z             |                     |d|                                            |                     |d|                                            |                     |d|                                            |                     |d|                                            |                     |d|                                            d S )Nz1.0ri  zMetadata-Version: %s
z	Name: %s
zVersion: %s
zSummary: %s
zHome-page: %s
zAuthor: %s
zAuthor-email: %s
zLicense: %s
zDownload-URL: %s
zDescription: %s
r   zKeywords: %s
Platform
ClassifierRequiresProvides	Obsoletes)r5   r6   r7   r3   rY  rh   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)rn   rj  r'   	long_descr4   s        r   ro  z#DistributionMetadata.write_pkg_file_  s   	M 	T] 	dn 	 	$($5	G

+g5666

<$--//1222

?T%5%5%7%77888

?T%9%9%;%;;<<<

$t||~~5666

>D$4$4$6$66777

'$*@*@*B*BBCCC

?T%5%5%7%77888 	AJJ+d.??@@@!$";";"="=>>	

&233388D--//00 	4JJ'(2333z4+=+=+?+?@@@|T-A-A-C-CDDD 	z4+<+<+>+>???z4+<+<+>+>???{D,>,>,@,@AAAAAr   c                 F    |D ]}|                     |d|d           d S )Nz: rB   )rh   )rn   rj  r&   rd  r   s        r   r  z DistributionMetadata._write_list  s=     	3 	3EJJTTT55512222	3 	3r   c                     | j         pdS r_  )r&   r   s    r   ry  zDistributionMetadata.get_name  s    y%I%r   c                     | j         pdS )Nz0.0.0)r'   r   s    r   rz  z DistributionMetadata.get_version  s    |&w&r   c                 X    |                                  d|                                 S )NrD   )ry  rz  r   s    r   get_fullnamez!DistributionMetadata.get_fullname  s(    --////4+;+;+=+=+=>>r   c                     | j         pdS r_  )r*   r   s    r   
get_authorzDistributionMetadata.get_author  s    {'i'r   c                     | j         pdS r_  )rU  r   s    r   get_author_emailz%DistributionMetadata.get_author_email       -I-r   c                     | j         pdS r_  )r,   r   s    r   get_maintainerz#DistributionMetadata.get_maintainer  s    +)+r   c                     | j         pdS r_  )rV  r   s    r   get_maintainer_emailz)DistributionMetadata.get_maintainer_email      $1	1r   c                 "    | j         p| j        pdS r_  )r,   r*   r   s    r   r}  z DistributionMetadata.get_contact  s    :$+::r   c                 "    | j         p| j        pdS r_  )rV  rU  r   s    r   r~  z&DistributionMetadata.get_contact_email  s    $F(9FYFr   c                     | j         pdS r_  )r.   r   s    r   r|  zDistributionMetadata.get_url  s    x$9$r   c                     | j         pdS r_  )r/   r   s    r   r  z DistributionMetadata.get_license  s    |(y(r   c                     | j         pdS r_  )r1   r   s    r   r{  z$DistributionMetadata.get_description  s    ,9,r   c                     | j         pdS r_  )rW  r   s    r   r  z)DistributionMetadata.get_long_description  r  r   c                     | j         pg S r|   )r4   r   s    r   r  z!DistributionMetadata.get_keywords      }""r   c                 0    t          |d          | _        d S )Nr4   )r   r4   rn   r   s     r   set_keywordsz!DistributionMetadata.set_keywords  s    $UJ77r   c                     | j         pdgS r_  )r2   r   s    r   r  z"DistributionMetadata.get_platforms  s    ~,),r   c                 0    t          |d          | _        d S )Nr2   )r   r2   r  s     r   set_platformsz"DistributionMetadata.set_platforms  s    %e[99r   c                     | j         pg S r|   )r3   r   s    r   r  z$DistributionMetadata.get_classifiers  s    %2%r   c                 0    t          |d          | _        d S )Nr3   )r   r3   r  s     r   set_classifiersz$DistributionMetadata.set_classifiers  s    '}==r   c                     | j         pdS r_  )rY  r   s    r   get_download_urlz%DistributionMetadata.get_download_url  r  r   c                     | j         pg S r|   )r6   r   s    r   r  z!DistributionMetadata.get_requires  r  r   c                 t    dd l }|D ]}|j                            |           t          |          | _        d S r@  )distutils.versionpredicateversionpredicateVersionPredicater   r6   rn   r   r   r   s       r   set_requiresz!DistributionMetadata.set_requires  sH    )))) 	; 	;A&77::::Ur   c                     | j         pg S r|   )r5   r   s    r   r  z!DistributionMetadata.get_provides  r  r   c                 r    d |D             }|D ] }dd l }|j                            |           !|| _        d S )Nc                 6    g | ]}|                                 S r   r   )r;   r   s     r   r=   z5DistributionMetadata.set_provides.<locals>.<listcomp>  s     ***q***r   r   )r  r  split_provisionr5   )rn   r   r   r   s       r   set_providesz!DistributionMetadata.set_provides  sU    **E*** 	: 	:A----&66q9999r   c                     | j         pg S r|   )r7   r   s    r   r  z"DistributionMetadata.get_obsoletes  s    ~##r   c                 t    dd l }|D ]}|j                            |           t          |          | _        d S r@  )r  r  r  r   r7   r  s       r   set_obsoletesz"DistributionMetadata.set_obsoletes  sH    )))) 	; 	;A&77::::er   r|   )$r   rQ  rR  rJ   rz   r[  rr  ro  r  ry  rz  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   rH   rH     s       " " " ".2" 2" 2"h* * * B  B  BD3 3 3& & &' ' '? ? ?( ( (. . ., , ,2 2 2; ; ;G G G% % %) ) )K- - -2 2 2# # #8 8 8- - -: : :& & &> > >. . .# # #$ $ $# # #  $ $ $% % % % %r   rH   c                 P    	 g }| D ]}|                     |dd                     |S )Nr      )r   )rA   new_options
help_tuples      r   r   r     sB     K , ,
:ac?++++r   )rf   r   reemailr   rd   r  distutils.errorsdistutils.fancy_getoptr   r   distutils.utilr   r   r	   r   r   distutils.debugr   compiler   r   r   rH   r   r   r   r   <module>r     ss   


 				 				 # # # # # #OOOO   HHH     A A A A A A A A B B B B B B B B B B       ! ! ! ! ! ! RZ455
  J, J, J, J, J, J, J, J,f`% `% `% `% `% `% `% `%D    s    $$