ÿØÿà JFIF      ÿÛ „ 	 ( %!1!%)+//.383,7(-.+



-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ               ÿÄ J  	     ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ              ÿÄ *        !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍÑ¶¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
..............................................................................................................................................................................
.............................................................................                                                  
                                                                                                                                                                                     ÿØÿà JFIF      ÿÛ „ 	 ( %!1!%)+//.383,7(-.+



-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ               ÿÄ J  	     ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ              ÿÄ *        !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍÑ¶¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
..............................................................................................................................................................................
.............................................................................                                                  
                                                                                                                                                                                     3

  \                 @   s   d dl Z d dlZd dlZd dlmZ yd dlZW n ek
rH   dZY nX 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G d	d
 d
ZG dd dZd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               @   sl  e Zd Zd}d~dddgZdZdddddddddddddddddddddgZd=d> eD ZddiZdd?d@ZdAdB Z	ddDdEZ
dFdG ZddHdIZdJdK ZdLdM ZdNdO ZdPdQ Zddg fdRdSZdTdU ZdVdW ZdXdY ZdZd[ Zd\d] Zd^d_ Zdd`daZddbdcZddedfZejfdgdhZdidj Zdkdl Zdmdn Z dodp Z!dqdr Z"dsdt Z#dudv Z$dwdx Z%dydz Z&d{d| Z'dS )Distributionverbosevrun verbosely (default)   quietq!run quietly (turns verbosity off)dry-runndon't actually do anythinghelphshow detailed help messageno-user-cfgN-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
help-commandslist all available commandsnameprint package nameversionVprint package versionfullnameprint <package name>-<version>authorprint the author's nameauthor-email print the author's email address
maintainerprint the maintainer's namemaintainer-email$print the maintainer's email addresscontact7print the maintainer's name if known, else the author'scontact-email@print the maintainer's email address if known, else the author'surlprint the URL for this packagelicense print the license of the packagelicencealias for --licensedescriptionprint the package descriptionlong-description"print the long package description	platformsprint the list of platformsclassifiersprint the list of classifierskeywordsprint the list of keywordsprovides+print the list of packages/modules providedrequires+print the list of packages/modules required	obsoletes0print the list of packages/modules made obsoletec             C   s   g | ]}t |d  qS )r   )r   ).0x rH   &/usr/lib64/python3.6/distutils/dist.py
<listcomp>s   s    zDistribution.<listcomp>c             C   s  d| _ d| _d| _x| jD ]}t| |d qW t | _x,| jjD ] }d| }t| |t| j| q@W i | _	d | _
d | _d | _i | _g | _d | _i | _d | _d | _d | _d | _d | _d | _d | _d | _d | _d | _d| _i | _i | _|r8|jd}|d k	rH|d= xD|j D ]8\}}| j |}x"|j D ]\}	}
d|
f||	< q(W qW d|kr|d |d< |d= d	}t!d k	r~t!j"| nt#j$j%|d
  x|j D ]\}}
t&| jd| rt| jd| |
 njt&| j|rt| j||
 nLt&| |r t| ||
 n2dt'| }t!d k	r"t!j"| nt#j$j%|d
  qW d| _(| jd k	r|x0| jD ]&}|j)dsdP |dkrRd| _(P qRW | j*  d S )Nr   r   get_ optionszsetup scriptr4   r2   z:'licence' distribution option is deprecated; use 'license'
Z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_optionsZ
dist_filespackagesZpackage_dataZpackage_dir
py_modules	librariesheadersext_modulesZext_packageZinclude_dirsZ
extra_pathscripts
data_filesZpasswordcommand_objhave_rungetitemsget_option_dictwarningswarnsysstderrwritehasattrreprwant_user_cfg
startswithfinalize_options)selfZattrsattrbasenameZmethod_namerM   commandZcmd_optionsopt_dictoptvalmsgkeyargrH   rH   rI   __init__z   s    






zDistribution.__init__c             C   s&   | j j|}|d kr"i  }| j |< |S )N)r[   re   )rr   ru   dictrH   rH   rI   rg     s    zDistribution.get_option_dictrL   c       	      C   s   ddl m} |d kr"t| jj }|d k	r@| j||  |d }|sV| j|d  d S xt|D ]l}| jj|}|d kr| j|d|   q\| j|d|   ||}x$|jdD ]}| j|d |  qW q\W d S )Nr   )pformatz  zno commands known yetzno option dict for '%s' commandzoption dict for '%s' command:rN   )pprintr~   sortedr[   keysannouncere   split)	rr   headercommandsindentr~   Zcmd_namerv   outlinerH   rH   rI   dump_option_dicts&  s&    
zDistribution.dump_option_dictsc             C   s   g }t   tjjtjd j}tjj|d}tjj|rB|j	| tj
dkrRd}nd}| jrtjjtjjd|}tjj|r|j	| d}tjj|r|j	| tr| jdd	j|  |S )
N	distutilszdistutils.cfgposixz.pydistutils.cfgzpydistutils.cfg~z	setup.cfgzusing config files: %sz, )r   ospathdirnamerj   modules__file__joinisfileappendr   ro   
expanduserr
   r   )rr   filesZsys_dirZsys_fileZuser_filenameZ	user_fileZ
local_filerH   rH   rI   find_config_filesB  s&    



zDistribution.find_config_filesc             C   s  ddl m} tjtjkr8ddddddd	d
dddddg}ng }t|}|d krT| j }trb| jd | }x|D ]}tr| jd|  |j	| xf|j
 D ]Z}|j|}| j|}x@|D ]8}	|	dkr|	|kr|j||	}
|	jdd}	||
f||	< qW qW |j  qnW d| jkrx| jd j D ]\}	\}}
| jj|	}yF|rRt| |t|
  n(|	dkrnt| |	t|
 nt| |	|
 W n, tk
r } zt|W Y d d }~X nX qW d S )Nr   )ConfigParserz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 %s__name__rO   _globalr   rP   )r   rP   )Zconfigparserr   rj   r   base_prefix	frozensetr   r
   r   readZsectionsrM   rg   re   replacer|   r[   rf   negative_optrR   r   
ValueErrorDistutilsOptionError)rr   	filenamesr   Zignore_optionsparserfilenameZsectionrM   rv   rw   rx   srcaliasry   rH   rH   rI   parse_config_filesr  sJ    






zDistribution.parse_config_filesc             C   s   | j  }g | _t|| j }|j| j |jddi |j| j| d}|j	 }t
j| j | j|rhd S x |r| j||}|d krjd S qjW | jr| j|t| jdk| jd d S | jstddS )Nr4   r2   )argsobjectr   )display_optionsr   zno commands suppliedT)_get_toplevel_optionsr   r   r   set_negative_aliasesr   Zset_aliasesgetoptrZ   Zget_option_orderr	   Zset_verbosityr   handle_display_options_parse_command_optsr   
_show_helplenDistutilsArgError)rr   Ztoplevel_optionsr   r   option_orderrH   rH   rI   parse_command_line  s,    	

zDistribution.parse_command_linec             C   s   | j dg S )Ncommand-packages=0list of packages that provide distutils commands)r   Nr   )global_options)rr   rH   rH   rI   r     s     z"Distribution._get_toplevel_optionsc             C   s  ddl m} |d }tj|s*td| | jj| y| j|}W n* tk
rn } zt	|W Y d d }~X nX t
||std| t|dot|jtsd}t|| | j}t|dr|j }|j|j t|drt|jtrt|j}ng }|j| j|j |  |j| |j|d	d  \}}	t|	d
rV|	jrV| j|d|gd d S t|drt|jtrd}
xP|jD ]F\}}}}t|	|j|r|d	}
t|r|  ntd||f q|W |
rd S | j|}x&t|	j D ]\}}d|f||< qW |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   r   zYinvalid help function %r for help option '%s': must be a callable object (function, etc.)zcommand line) distutils.cmdr   
command_rematch
SystemExitr   r   get_command_classDistutilsModuleErrorr   
issubclassZDistutilsClassErrorrm   
isinstancer   listr   copyupdater   fix_help_optionsset_option_tabler   r   r   r   r   Zget_attr_namecallablerg   varsrf   )rr   r   r   r   ru   Z	cmd_classry   r   r   ZoptsZhelp_option_foundZhelp_optionZshortZdescfuncrv   r   valuerH   rH   rI   r     sb    










z Distribution._parse_command_optsc             C   sT   xNdD ]F}t | j|}|d kr qt|trdd |jdD }t| j|| qW d S )Nr>   r:   c             S   s   g | ]}|j  qS rH   )strip)rF   ZelmrH   rH   rI   rJ   _  s    z1Distribution.finalize_options.<locals>.<listcomp>,)r>   r:   )rV   rT   r   strr   rR   )rr   rs   r   rH   rH   rI   rq   U  s    

zDistribution.finalize_optionsc       
      C   s  ddl m} ddlm} |rR|r*| j }n| j}|j| |j| jd  t	d |rt|j| j
 |jd
 t	d x| jD ]z}t|trt||r|}	n
| j|}	t|	drt|	jtr|j|	jt|	j  n|j|	j |jd	|	j  t	d q|W t	|| j d S )Nr   )	gen_usage)r   z
Global options:rL   z*Information display options (just display z!information, ignore any commands)r   zOptions for '%s' command:zKInformation display options (just display information, ignore any commands))distutils.corer   r   r   r   r   r   Z
print_helpcommon_usageprintr   r   r   typer   r   rm   r   r   r   r   r   rY   )
rr   r   r   r   r   r   r   rM   ru   klassrH   rH   rI   r   b  s6    

 

zDistribution._show_helpc       	      C   s   ddl m} | jr4| j  td t|| j dS d}i }x| jD ]}d||d < qDW xt|D ]l\}}|r^|j|r^t|}t	| j
d|  }|dkrtdj| n |dkrtdj| nt| d}q^W |S )Nr   )r   rL   r   rK   r>   r:   r   r<   r@   rB   rD   rN   )r>   r:   )r<   r@   rB   rD   )r   r   Zhelp_commandsprint_commandsr   rY   r   re   r   rV   rT   r   )	rr   r   r   Zany_display_optionsZis_display_optionoptionrw   rx   r   rH   rH   rI   r     s,    z#Distribution.handle_display_optionsc             C   sn   t |d  x\|D ]T}| jj|}|s0| j|}y
|j}W n tk
rR   d}Y nX t d|||f  qW d S )N:z(no description available)z
  %-*s  %s)r   rW   re   r   r6   AttributeError)rr   r   r   
max_lengthcmdr   r6   rH   rH   rI   print_command_list  s    



zDistribution.print_command_listc             C   s   dd l }|jj}i }x|D ]}d||< qW g }x&| jj D ]}|j|s:|j| q:W d}x$|| D ]}t||krdt|}qdW | j|d| |rt	  | j|d| d S )Nr   r   zStandard commandszExtra commands)
distutils.commandru   __all__rW   r   re   r   r   r   r   )rr   r   std_commandsis_stdr   extra_commandsr   rH   rH   rI   r     s*    

zDistribution.print_commandsc       	      C   s   dd l }|jj}i }x|D ]}d||< qW g }x&| jj D ]}|j|s:|j| q:W g }x\|| D ]P}| jj|}|s| j|}y
|j}W n t	k
r   d}Y nX |j||f qdW |S )Nr   r   z(no description available))
r   ru   r   rW   r   re   r   r   r6   r   )	rr   r   r   r   r   r   rvr   r6   rH   rH   rI   get_command_list  s(    	




zDistribution.get_command_listc             C   sN   | j }t|tsJ|d krd}dd |jdD }d|krD|jdd || _ |S )NrL   c             S   s   g | ]}|d kr|j  qS )rL   )r   )rF   ZpkgrH   rH   rI   rJ     s    z5Distribution.get_command_packages.<locals>.<listcomp>r   zdistutils.commandr   )rX   r   r   r   insert)rr   ZpkgsrH   rH   rI   get_command_packages  s    
z!Distribution.get_command_packagesc             C   s   | j j|}|r|S x| j D ]}d||f }|}yt| tj| }W n tk
r^   wY nX yt||}W n& tk
r   t	d|||f Y nX || j |< |S W t	d| d S )Nz%s.%sz3invalid command '%s' (no class '%s' in module '%s')zinvalid command '%s')
rW   re   r   
__import__rj   r   ImportErrorrV   r   r   )rr   ru   r   ZpkgnameZmodule_nameZ
klass_namemodulerH   rH   rI   r     s(    
zDistribution.get_command_classc             C   sn   | j j|}| rj|rjtr(| jd|  | j|}||  }| j |< d| j|< | jj|}|rj| j|| |S )Nz<Distribution.get_command_obj(): creating '%s' command objectr   )rc   re   r
   r   r   rd   r[   _set_command_options)rr   ru   Zcreatecmd_objr   rM   rH   rH   rI   get_command_objB  s    


zDistribution.get_command_objc          !   C   sb  |j  }|d kr| j|}tr,| jd|  x.|j D ] \}\}}tr^| jd|||f  ydd |jD }W n tk
r   g }Y nX y
|j}W n tk
r   i }Y nX y|t|t	}	||kr|	rt
||| t|  nJ||kr|	rt
||t| n,t||rt
||| ntd|||f W q8 tk
rX }
 zt|
W Y d d }
~
X q8X q8W d S )Nz#  setting options for '%s' command:z    %s = %s (from %s)c             S   s   g | ]}t |qS rH   )r   )rF   orH   rH   rI   rJ   q  s   z5Distribution._set_command_options.<locals>.<listcomp>z1error in %s: command '%s' has no such option '%s')get_command_namerg   r
   r   rf   Zboolean_optionsr   r   r   r   rR   r   rm   r   r   )rr   rc   Zoption_dictcommand_namer   sourcer   Z	bool_optsZneg_optZ	is_stringry   rH   rH   rI   r   ]  s>    	






z!Distribution._set_command_optionsr   c             C   s   ddl m} t||s&|}| j|}n|j }|js8|S |j  d|_d| j|< | j| |r|x|j	 D ]}| j
|| qhW |S )Nr   )r   )r   r   r   r   r   Z	finalizedZinitialize_optionsrd   r   Zget_sub_commandsreinitialize_command)rr   ru   Zreinit_subcommandsr   r   subrH   rH   rI   r     s    


z!Distribution.reinitialize_commandc             C   s   t j || d S )N)r	   )rr   ry   levelrH   rH   rI   r     s    zDistribution.announcec             C   s   x| j D ]}| j| qW d S )N)r   run_command)rr   r   rH   rH   rI   run_commands  s    zDistribution.run_commandsc             C   sD   | j j|rd S tjd| | j|}|j  |j  d| j |< d S )Nz
running %sr   )rd   re   r	   infor   Zensure_finalizedZrun)rr   ru   r   rH   rH   rI   r     s    	
zDistribution.run_commandc             C   s   t | jp| jpg dkS )Nr   )r   r\   r]   )rr   rH   rH   rI   has_pure_modules  s    zDistribution.has_pure_modulesc             C   s   | j ot| j dkS )Nr   )r`   r   )rr   rH   rH   rI   has_ext_modules  s    zDistribution.has_ext_modulesc             C   s   | j ot| j dkS )Nr   )r^   r   )rr   rH   rH   rI   has_c_libraries  s    zDistribution.has_c_librariesc             C   s   | j  p| j S )N)r   r   )rr   rH   rH   rI   has_modules  s    zDistribution.has_modulesc             C   s   | j ot| j dkS )Nr   )r_   r   )rr   rH   rH   rI   has_headers  s    zDistribution.has_headersc             C   s   | j ot| j dkS )Nr   )ra   r   )rr   rH   rH   rI   has_scripts  s    zDistribution.has_scriptsc             C   s   | j ot| j dkS )Nr   )rb   r   )rr   rH   rH   rI   has_data_files  s    zDistribution.has_data_filesc             C   s   | j  o| j  o| j  S )N)r   r   r   )rr   rH   rH   rI   is_pure  s    
zDistribution.is_pure)r   r   r   r   )r   r   r   )r   r   r   )r   r   r   )r   Nr   )r   Nr   )r   Nr   )r   r    r!   )r"   Nr#   )r$   Nr%   )r&   Nr'   )r(   Nr)   )r*   Nr+   )r,   Nr-   )r.   Nr/   )r0   Nr1   )r2   Nr3   )r4   Nr5   )r6   Nr7   )r8   Nr9   )r:   Nr;   )r<   Nr=   )r>   Nr?   )r@   NrA   )rB   NrC   )rD   NrE   )N)NNrL   )N)r   )N)r   )(r   
__module____qualname__r   r   r   rQ   r   r|   rg   r   r   r   r   r   r   rq   r   r   r   r   r   r   r   r   r   r   r	   INFOr   r   r   r   r   r   r   r   r   r   r  rH   rH   rH   rI   r      s    
                     
 "
0
:C[1(!"&

,
)
r   c               @   s   e Zd ZdNZdOddZdd Zdd Zdd Zdd Zd d! Z	d"d# Z
d$d% Zd&d' Zd(d) Zd*d+ Zd,d- Zd.d/ Zd0d1 Zd2d3 Zd4d5 ZeZd6d7 Zd8d9 Zd:d; Zd<d= Zd>d? Zd@dA ZdBdC ZdDdE ZdFdG ZdHdI ZdJdK ZdLdM Z dS )PrS   r   r   r$   author_emailr(   maintainer_emailr0   r2   r6   long_descriptionr>   r:   r"   r,   contact_emailr<   download_urlr@   rB   rD   Nc             C   s   |d k	r| j t| nfd | _d | _d | _d | _d | _d | _d | _d | _	d | _
d | _d | _d | _d | _d | _d | _d | _d | _d S )N)read_pkg_fileopenr   r   r$   r  r(   r  r0   r2   r6   r  r>   r:   r<   r	  r@   rB   rD   )rr   r   rH   rH   rI   r|     s&    zDistributionMetadata.__init__c                s  t |  fdd} fdd} d }|d| _|d| _|d| _|d	| _d | _|d
| _d | _|d| _|d| _	d kr|d| _
nd | _
|d| _|d| _d kr|djd| _|d| _|d| _|dkr|d| _|d| _|d| _nd | _d | _d | _d S )Nc                s    |  }|dkrd S |S )NUNKNOWNrH   )r   r   )ry   rH   rI   _read_field  s    z7DistributionMetadata.read_pkg_file.<locals>._read_fieldc                s    j | d }|g krd S |S )N)Zget_all)r   values)ry   rH   rI   
_read_list#  s    z6DistributionMetadata.read_pkg_file.<locals>._read_listzmetadata-versionr   r   Zsummaryr$   zauthor-emailz	home-pager2   zdownload-urlr6   r>   r   platformZ
classifierz1.1rB   r@   rD   )r   r   r   r6   r$   r(   r  r  r0   r2   r	  r  r   r>   r:   r<   rB   r@   rD   )rr   filer  r  Zmetadata_versionrH   )ry   rI   r
    s:    












z"DistributionMetadata.read_pkg_filec          	   C   s2   t tjj|dddd}| j| W d Q R X d S )NzPKG-INFOwzUTF-8)encoding)r  r   r   r   write_pkg_file)rr   Zbase_dirZpkg_inforH   rH   rI   write_pkg_infoM  s    
z#DistributionMetadata.write_pkg_infoc             C   sb  d}| j s"| js"| js"| js"| jr&d}|jd|  |jd| j   |jd| j   |jd| j   |jd| j	   |jd| j
   |jd	| j   |jd
| j   | jr|jd| j  t| j }|jd|  dj| j }|r|jd|  | j|d| j  | j|d| j  | j|d| j  | j|d| j  | j|d| j  d S )Nz1.0z1.1z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
ZPlatformZ
ClassifierZRequiresZProvidesZ	Obsoletes)r@   rB   rD   r<   r	  rl   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)rr   r  r   Z	long_descr>   rH   rH   rI   r  T  s0    z#DistributionMetadata.write_pkg_filec             C   s$   x|D ]}|j d||f  qW d S )Nz%s: %s
)rl   )rr   r  r   r  r   rH   rH   rI   r  v  s    
z DistributionMetadata._write_listc             C   s
   | j pdS )Nr  )r   )rr   rH   rH   rI   r  |  s    zDistributionMetadata.get_namec             C   s
   | j pdS )Nz0.0.0)r   )rr   rH   rH   rI   r    s    z DistributionMetadata.get_versionc             C   s   d| j  | j f S )Nz%s-%s)r  r  )rr   rH   rH   rI   get_fullname  s    z!DistributionMetadata.get_fullnamec             C   s
   | j pdS )Nr  )r$   )rr   rH   rH   rI   
get_author  s    zDistributionMetadata.get_authorc             C   s
   | j pdS )Nr  )r  )rr   rH   rH   rI   get_author_email  s    z%DistributionMetadata.get_author_emailc             C   s
   | j pdS )Nr  )r(   )rr   rH   rH   rI   get_maintainer  s    z#DistributionMetadata.get_maintainerc             C   s
   | j pdS )Nr  )r  )rr   rH   rH   rI   get_maintainer_email  s    z)DistributionMetadata.get_maintainer_emailc             C   s   | j p| jpdS )Nr  )r(   r$   )rr   rH   rH   rI   r    s    z DistributionMetadata.get_contactc             C   s   | j p| jpdS )Nr  )r  r  )rr   rH   rH   rI   r    s    z&DistributionMetadata.get_contact_emailc             C   s
   | j pdS )Nr  )r0   )rr   rH   rH   rI   r    s    zDistributionMetadata.get_urlc             C   s
   | j pdS )Nr  )r2   )rr   rH   rH   rI   r    s    z DistributionMetadata.get_licensec             C   s
   | j pdS )Nr  )r6   )rr   rH   rH   rI   r    s    z$DistributionMetadata.get_descriptionc             C   s
   | j pdS )Nr  )r  )rr   rH   rH   rI   r    s    z)DistributionMetadata.get_long_descriptionc             C   s
   | j pg S )N)r>   )rr   rH   rH   rI   r    s    z!DistributionMetadata.get_keywordsc             C   s   | j p
dgS )Nr  )r:   )rr   rH   rH   rI   r     s    z"DistributionMetadata.get_platformsc             C   s
   | j pg S )N)r<   )rr   rH   rH   rI   r!    s    z$DistributionMetadata.get_classifiersc             C   s
   | j pdS )Nr  )r	  )rr   rH   rH   rI   get_download_url  s    z%DistributionMetadata.get_download_urlc             C   s
   | j pg S )N)rB   )rr   rH   rH   rI   r"    s    z!DistributionMetadata.get_requiresc             C   s,   dd l }x|D ]}|jj| qW || _d S )Nr   )distutils.versionpredicateversionpredicateVersionPredicaterB   )rr   r   r   r   rH   rH   rI   set_requires  s    
z!DistributionMetadata.set_requiresc             C   s
   | j pg S )N)r@   )rr   rH   rH   rI   r#    s    z!DistributionMetadata.get_providesc             C   s:   dd |D }x |D ]}dd l }|jj| qW || _d S )Nc             S   s   g | ]}|j  qS rH   )r   )rF   r   rH   rH   rI   rJ     s    z5DistributionMetadata.set_provides.<locals>.<listcomp>r   )r+  r,  Zsplit_provisionr@   )rr   r   r   r   rH   rH   rI   set_provides  s
    
z!DistributionMetadata.set_providesc             C   s
   | j pg S )N)rD   )rr   rH   rH   rI   r$    s    z"DistributionMetadata.get_obsoletesc             C   s,   dd l }x|D ]}|jj| qW || _d S )Nr   )r+  r,  r-  rD   )rr   r   r   r   rH   rH   rI   set_obsoletes  s    
z"DistributionMetadata.set_obsoletes)r   r   r$   r  r(   r  r0   r2   r6   r  r>   r:   r"   r,   r  r<   r	  r@   rB   rD   )N)!r   r  r  rU   r|   r
  r  r  r  r  r  r%  r&  r'  r(  r)  r  r  r  r  Zget_licencer  r  r  r   r!  r*  r"  r.  r#  r/  r$  r0  rH   rH   rH   rI   rS     sF        
4"rS   c             C   s(   g }x| D ]}|j |dd  q
W |S )Nr      )r   )rM   Znew_optionsZ
help_tuplerH   rH   rI   r     s    
r   )rj   r   reZemailr   rh   r   Zdistutils.errorsZdistutils.fancy_getoptr   r   Zdistutils.utilr   r   r   r   r	   Zdistutils.debugr
   compiler   r   rS   r   rH   rH   rH   rI   <module>   s0   

       ] Z