_ddZddlZddlZddlZddlZddlZddlZddlmZ ddl Z ddl m Z m Z mZmZddlmZmZddlmZmZmZddlmZdd lmZej6d Zd ZGd d ZGddZdZ y#e $rdZ Y`wxYw)z}distutils.dist Provides the Distribution class, which represents the module distribution being built/installed/distributed. N)message_from_file)DistutilsOptionErrorDistutilsModuleErrorDistutilsArgErrorDistutilsClassError) FancyGetopttranslate_longopt) check_environ strtobool rfc822_escapelog)DEBUGz^[a-zA-Z]([a-zA-Z0-9_]*)$ct|tr |St|tsQt|j}d}|j dit }tj|t|}|S)Nz>Warning: '{fieldname}' should be a list, got type '{typename}') isinstancestrlisttype__name__formatlocalsrwarning)value fieldnametypenamemsgs fdZ dZ!d Z"d!Z#d"Z$d#Z%d$Z&d%Z'd&Z(d'Z)d(Z*ycc}}}w)- DistributionaThe 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. ))verbosevzrun verbosely (default)r)quietqz!run quietly (turns verbosity off))zdry-runnzdon't actually do anything)helphzshow 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-commandsNzlist all available commands)nameNzprint package name)versionVzprint package version)fullnameNzprint -)authorNzprint the author's name) author-emailNz print the author's email address) maintainerNzprint the maintainer's name)zmaintainer-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)urlNzprint the URL for this package)licenseNz print the license of the package)licenceNzalias for --license) descriptionNzprint the package description)zlong-descriptionNz"print the long package description) platformsNzprint the list of platforms) classifiersNzprint the list of classifiers)keywordsNzprint 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 obsoleterr&r$Nc d|_d|_d|_|jD]}t ||dt |_|j jD](}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|_|ri|j=d}|K|d=|j?D]5\}}|jA|}|j?D] \} } d| f|| <7d|vrK|d|d <|d=d } tBtCjD| n"tFjHjK| d z|j?D]\} } tM|j d | zr t|j d | z| ?tM|j | rt |j | | mtM|| rt || | d tO| z} tCjD| d|_(|j2|jD]#} | jSdsn| dk(sd|_(n|jUy)a0Construct 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()'. rrget_Noptionsz setup scriptr5r4z:'licence' distribution option is deprecated; use 'license' set_zUnknown distribution option: %sT-z --no-user-cfgF)+r$dry_runr)display_option_namessetattrDistributionMetadatametadata_METHOD_BASENAMESgetattrcmdclasscommand_packages script_name script_argscommand_options dist_filespackages package_data package_dir py_modules librariesheaders ext_modules ext_package include_dirs extra_pathscripts data_filespassword command_objhave_rungetitemsget_option_dictwarningswarnsysstderrwritehasattrrepr want_user_cfg startswithfinalize_options)selfattrsattrbasename method_namer@command cmd_optionsopt_dictoptvalrkeyargs r__init__zDistribution.__init__s   -- #D D$ " #-.  77 LH 8+K D+wt}}k'J K L !%   "        ii *G")$,3MMO>(G[#33GS)7(= >> E!#(#3i )$R'MM#&JJ$$S4Z0"KKM 'S4==&3,78GDMM6C<8=T]]C0DMM34T3'D#s+;d3iGCMM#& '""    ''' ~~c*/)).D&   r!cb|jj|}|ix}|j|<|S)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. )rOr`)rmrrdicts rrbzDistribution.get_option_dicts9 ##''0 <35 5D4''0 r!cddlm}|#t|jj }||j ||z|dz}|s|j |dzy|D]}|jj |}||j |d|zz8|j |d|zz||}|jdD]}|j |dz|zy)Nr)pformatz zno commands known yetzno option dict for '%s' commandzoption dict for '%s' command:rA)pprintr}sortedrOkeysannouncer`split) rmheadercommandsindentr}cmd_namertoutlines rdump_option_dictszDistribution.dump_option_dicts(s"  d22779:H   MM&6/ *d]F MM&#:: ;   8H++//9H f'H8'SST f'F'QQRh'IIdO8DMM&4-$"678 8r!ct|jDcgc]-}tjj |s#t |/}}t r#|jddj|z|Scc}w)aFind 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 zusing config files: %sz, ) r _gen_pathsospathisfilerrrjoin)rmrfiless rfind_config_fileszDistribution.find_config_filesBs_ '+'8QtBGGNN4 > ? ? ?sCD+C7. D7D<Dcddlm}tjtjk7rgd}ng}t |}||j }tr|jd|}|D]}tr|jd|z|j||jD]a}|j|}|j|}|D]8} | dk7s | |vs|j|| } | jdd} || f|| <:c|jd |j vr|j d j#D]f\} \} } |j$j| } | rt'|| t)|  n(| d vrt'|| t)| n t'|| | hyy#t*$r} t-| d} ~ wwxYw) Nr) ConfigParser) z install-basezinstall-platbasez install-libzinstall-platlibzinstall-purelibzinstall-headerszinstall-scriptsz install-datarz exec-prefixhomeuserrootz"Distribution.parse_config_files():z reading %srrC_global)r$rD) configparserrrer base_prefix frozensetrrrreadsectionsr@rbr`replaceryrOra negative_optrFr ValueErrorr)rm filenamesrignore_optionsparserrsectionr@rtrurvsrcaliasrs rparse_config_fileszDistribution.parse_config_filesks- :: (N  N">2  ..0I  MM> ?! H nx78 KK !!??, 8 ..1//8"8Cj(S-F$jj#6!kk#s3)13 8  8 OO ! * t++ +#'#7#7#A#G#G#I 4Zc3))--c24e3-?@ 66c9S>:c3/ 4 ,"4.s334s0AF66 G? G  Gc|j}g|_t||jz}|j |j |j ddi|j|j|}|j}tjjtjd|jzz |j|ry|r|j!||}|y|r|j"r5|j%|t'|jdk(|jy|js t)dy ) aParse 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). r5r4)argsobject Nrdisplay_optionsrzno commands suppliedT)_get_toplevel_optionsrr rset_negative_aliasesr set_aliasesgetoptrNget_option_orderlogging getLoggersetLevelWARNr$handle_display_options_parse_command_optsr) _show_helplenr)rmtoplevel_optionsrr option_orders rparse_command_linezDistribution.parse_command_lines/. 557 -0D0DDE##D$5$56Iy12}}$"2"24}@..0 $$W\\B4E%EF  & &| 4 ++FD9D| 99 OODMM(:a(?$--   }}#$:; ;r!c"|jdgzS)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. )zcommand-packages=Nz0list of packages that provide distutils commands)global_optionsrms rrz"Distribution._get_toplevel_optionss! "" &   r!cddlm}|d}tj|st d|z|j j | |j|}t||std|zt|drt|jtsd}t||z|j }t|dr+|j#}|j%|j t|d r0t|j&trt)|j&}ng}|j+|j,|jz|z|j/||j1|d d\}} t| d r"| j2r|j5|d|g yt|d rwt|j&tr]d} |j&D]I\} } } }t| |j7| s$d } t9|r|9td |d| d| ry|j;|}t=| j?D] \}}d|f||<|S#t$r}t|d}~wwxYw)aParse 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. rCommandzinvalid command name '%s'Nz&command class %s must subclass Command user_optionszIcommand class %s must provide 'user_options' attribute (a list of tuples)r help_optionsrr)rzinvalid help function z for help option 'z-': must be a callable object (function, etc.)z command line) distutils.cmdr command_rematch SystemExitrappendget_command_classrr issubclassrrhrrrrcopyupdaterfix_help_optionsset_option_tablerrrr)r get_attr_namecallablerbvarsra)rmrrrrr cmd_classrrroptshelp_option_found help_optionshortdescfuncrtr+rs rrz Distribution._parse_command_optss *q'(87BC C W%  )..w7I )W-%89D  I~ .91148> &cIo6 6(( 9n -',,.L    6 6 7 9n -*  " "D3 ,I,B,BCLL    )"8"8 8< G  ##L1}}T!"X. t 4 TYY OOFA O L  9n -*  " "D3 !" 2;2H2H . UD$4!5!5k!BC()%~1 $[2 !''0:++- 5KD%,e4HTN 5 U$ )#C( ( )s I,, J5 JJcdD]o}t|j|}|t|ts-|j dDcgc]}|j }}t |j||qycc}w)zSet final values for all the options on the Distribution instance, analogous to the .finalize_options() method of Command objects. r9r7N,)rJrHrrrstriprF)rmrorelms rrlzDistribution.finalize_optionscsm . 4DDMM40E}%%05 C0@AAA tU3  4 BsA6rc4ddlm}ddlm}|rY|r|j }n |j }|j ||j|jdztd|r7|j |j|jdtd|jD]}t|trt||r|} n|j|} t!| drLt| j"t$r2|j | j&t)| j"zn|j | j&|jd| j*ztdt||j,y ) abShow 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 gen_usagerz Global options:r?zKInformation display options (just display information, ignore any commands)rzOptions for '%s' command:N)distutils.corerrrrrr print_help common_usageprintrrrrrrrhrrrrrrM) rmrrrrrrr@rrklasss rrzDistribution._show_helppsR -) 446--  # #G ,   d//2EE F "I   # #D$8$8 9   6  "I}} G'4(Z-I..w7un-*U=O=OQU2V''&&)9%:L:L)MM''(:(:;   9ENNJ K "I  i(()*r!cddlm}|jr7|jt dt ||j yd}i}|j D] }d||d< |D]\}}|s |j|st|}t|jd|z}|dvrt dj|n*|dvrt d j|n t |d}|S) 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. rrr?rr>rr)r8r:r;r<rA) rr help_commandsprint_commandsrrMrr`r rJrHr) rmrrany_display_optionsis_display_optionoptionrurvrs rrz#Distribution.handle_display_optionss -       ! "I )D,,- .  ** -F+, fQi ( -% (HC(,,S1',< v|<>33#((5/*PP$))E*+%L&'# (#"r!ct|dz|D]N}|jj|}|s|j|} |j}td|||fzPy#t $rd}Y!wxYw)zZPrint a subset of the list of all commands -- used by 'print_commands()'. :(no description available)z %-*s %sN)rrKr`rr6AttributeError)rmrr max_lengthcmdrr6s rprint_command_listzDistribution.print_command_lists fsl ACMM%%c*E..s3 ;#//  ,*c;!?? @ A " ;:  ;s A## A10A1cddl}|jj}i}|D]}d||< g}|jj D]%}|j |r|j |'d}||zD]}t||kDst|}|j|d||rt|j|d|yy)anPrint 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'. rNrzStandard commandszExtra commands) distutils.commandrr__all__rKrr`rrrr)rmr std_commandsis_stdrextra_commandsrs rrzDistribution.print_commandss ! ((00  CF3K ==%%' +C::c?%%c* + .0 &C3x*$ X  &  .A:N  G  # #N4Dj Q r!cddl}|jj}i}|D]}d||< g}|jj D]%}|j |r|j |'g}||zD]P}|jj |}|s|j|} |j}|j ||fR|S#t$rd}Y$wxYw)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'. rNrr) r rrr rKrr`rrr6r) rmrr r rr rvrr6s rget_command_listzDistribution.get_command_lists ! ((00  CF3K ==%%' +C::c?%%c* +.0 *CMM%%c*E..s3 ;#//  IIsK( ) * " ;:  ;s& C  CCc|j}t|tsS|d}|jdDcgc]}|dk7s |j }}d|vr|j dd||_|Scc}w)z9Return a list of packages from which commands are loaded.r?rzdistutils.commandr)rLrrrrinsert)rmpkgspkgs rget_command_packagesz!Distribution.get_command_packagessr$$$%|+/::c?HCcRiCIIKHDH"$. A23$(D ! Is A2A2c |jj|}|r|S|jD]T}dj||}|} t |t j |} t||}||j|<|cStd|z#t$rYpwxYw#t$rtd|d|d|dwxYw)aoReturn 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. z{}.{}zinvalid command 'z ' (no class 'z ' in module 'z')zinvalid command '%s') rKr`rr __import__rer ImportErrorrJrr)rmrrrpkgname module_name klass_namemodules rrzDistribution.get_command_class's !!'* L002 G!..':K J ;'[1  3&+DMM' "L' *##9G#CDD   " * K9 sB' B$ B! B!$CcD|jj|}|s|rtr|jd|z|j |}||x}|j|<d|j |<|j j|}|r|j|||S)aReturn 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. zN:NOy(YK51AB[&1K7.!<9+ 0X!   "    0*3// 0sOD5D0 D5# E0A=E0D55 EE EE E0 E++E0cNddlm}t||s|}|j|}n|j }|j s|S|j d|_d|j|<|j||r'|jD]}|j|||S)aReinitializes 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. rr) rrrr!r$ finalizedinitialize_optionsr_rget_sub_commandsreinitialize_command)rmrrreinit_subcommandsrr'subs rr1z!Distribution.reinitialize_commands& *'7+"L**<8G"335L  N""$&' l# !!'* //1 C))#/AB Cr!c0tj||yNr)rmrlevels rrzDistribution.announces sr!cH|jD]}|j|y)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)rmrs r run_commandszDistribution.run_commandss% == "C   S ! "r!c|jj|rytjd||j |}|j |j d|j|<y)aDo 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 %sr)r_r`rinfor!ensure_finalizedrun)rmrrr s rr8zDistribution.run_commandsZ ==  W %  w'&&w/  " !" gr!cVt|jxs|jxsgdkDSNr)rrQrTrs rhas_pure_moduleszDistribution.has_pure_moduless$4==9DOO9r:Q>>r!cN|jxrt|jdkDSr?)rWrrs rhas_ext_moduleszDistribution.has_ext_moduless#=C(8(8$9A$==r!cN|jxrt|jdkDSr?)rUrrs rhas_c_librarieszDistribution.has_c_librariess~~9#dnn"5"99r!cF|jxs|jSr5)r@rBrs r has_moduleszDistribution.has_moduless$$&@$*>*>*@@r!cN|jxrt|jdkDSr?)rVrrs r has_headerszDistribution.has_headers||5DLL 1A 55r!cN|jxrt|jdkDSr?)r[rrs r has_scriptszDistribution.has_scriptsrIr!cN|jxrt|jdkDSr?)r\rrs rhas_data_fileszDistribution.has_data_filess;3t#7!#;;r!cn|jxr$|j xr|j Sr5)r@rBrDrs ris_purezDistribution.is_pures;  ! ! # +((** +((** r!r5)NNr?)r)r)+r __module__ __qualname____doc__rrrr rErryrbrrrrrrrrlrrrrrrrr!rr1rINFOrr9r8r@rBrDrFrHrKrMrO).0xr s000rr#r#5s *NLO6>MMM-ad3MY'L\ | 84.?$@4HAF  aF 4121r0+d%#NA"R<F %EN:)0V&T#*,,"#(?>:A66< }NsB)r#ceZdZdZdZd#dZdZdZdZdZ d Z d Z d Z d Z d ZdZdZdZdZdZdZeZdZdZdZdZdZdZdZdZdZdZdZ dZ!d Z"d!Z#d"Z$y)$rGz]Dummy class to hold the distribution meta-data: name, version, author, and so forth. )r+r,r/ author_emailr1maintainer_emailr3r4r6long_descriptionr9r7r.r2 contact_emailr8 download_urlr:r;r<Nc,||jt|yd|_d|_d|_d|_d|_d|_d|_d|_ d|_ d|_ d|_ d|_ d|_d|_d|_d|_d|_yr5) read_pkg_fileopenr+r,r/rWr1rXr3r4r6rYr9r7r8r[r:r;r<)rmrs rryzDistributionMetadata.__init__"s     tDz *DIDLDK $D "DO$(D !DHDL#D $(D ! DM!DN#D  $D  DM DM!DNr!cjt|fd}fd}d}|d|_|d|_|d|_|d|_d|_|d |_d|_|d |_|d |_ d vr|d |_ nd|_ |d |_ |d|_dvr|djd|_ |d|_|d|_|dk(r(|d|_|d|_|d|_yd|_d|_d|_y)z-Reads the metadata values from a file object.c$|}|r|dk7r|SyyNUNKNOWNr)r+rrs r _read_fieldz7DistributionMetadata.read_pkg_file.._read_field=s"IE)+ ,ur!c8j|d}|gk(ry|Sr5)get_all)r+valuesrs r _read_listz6DistributionMetadata.read_pkg_file.._read_listBs"[[t,F|Mr!zmetadata-versionr+r,summaryr/Nr0z home-pager4z download-urlr6r9rplatform classifier1.1r;r:r<)rr+r,r6r/r1rWrXr3r4r[rYrr9r7r8r;r:r<)rmfilercrgmetadata_versionrs @rr]z"DistributionMetadata.read_pkg_file9s<%    12' "9- &y1!(+ '7 ${+"9- S +N ;D  $D  +M :&y1  ' 399#>DM#J/%l3 u $&z2DM&z2DM' 4DN DM DM!DNr!cttjj|ddd5}|j |dddy#1swYyxYw)z.Write the PKG-INFO file into the release tree.zPKG-INFOwzUTF-8)encodingN)r^rrrwrite_pkg_file)rmbase_dirpkg_infos rwrite_pkg_infoz#DistributionMetadata.write_pkg_infolsF  GGLL: .g  *     ) * * *s AAc*d}|js0|js$|js|js |jrd}j d|zj d|j zj d|jzfd}|d|j|d|j|d |j|d |j|d |j|d |j|d t|jxsd|ddj|j!|j#d|j%|j#d|j'|j#d|j)|j#d|j+|j#d|j-y)z0Write the PKG-INFO format data to a file object.z1.0rkzMetadata-Version: %s z Name: %s z Version: %s c:|rj|d|dyy)Nz: rA)rg)rrvrls r maybe_writez8DistributionMetadata.write_pkg_file..maybe_writes$ fXRuB/0r!Summaryz Home-pageAuthorz Author-emailLicensez Download-URL Descriptionr?KeywordsrPlatform ClassifierRequiresProvides ObsoletesN)r:r;r<r8r[rgget_name get_versionget_descriptionget_url get_contactget_contact_email get_licenser get_long_descriptionr get_keywords _write_list get_platformsget_classifiers get_requires get_provides get_obsoletes)rmrlr,rws ` rrqz#DistributionMetadata.write_pkg_filess MM}}~~  G +g56 <$--/12 ?T%5%5%778 1 It3356K0Hd..01ND$:$:$<=It//12ND$5$56M=1J1J1L1RPR#STJ):):)< => z4+=+=+?@ |T-A-A-CD z4+<+<+>? z4+<+<+>? {D,>,>,@Ar!c`|xsg}|D]#}|jdj||%y)Nz{}: {} )rgr)rmrlr+rfrs rrz DistributionMetadata._write_lists32 7E JJz((u5 6 7r!c"|jxsdSra)r+rs rrzDistributionMetadata.get_namesyy%I%r!c"|jxsdS)Nz0.0.0)r,rs rrz DistributionMetadata.get_versions||&w&r!c^dj|j|jS)Nz{}-{})rrrrs r get_fullnamez!DistributionMetadata.get_fullnames"~~dmmot/?/?/ABBr!c|jSr5)r/rs r get_authorzDistributionMetadata.get_authors {{r!c|jSr5)rWrs rget_author_emailz%DistributionMetadata.get_author_email   r!c|jSr5)r1rs rget_maintainerz#DistributionMetadata.get_maintainers r!c|jSr5)rXrs rget_maintainer_emailz)DistributionMetadata.get_maintainer_email$$$r!c6|jxs |jSr5)r1r/rs rrz DistributionMetadata.get_contacts-$++-r!c6|jxs |jSr5)rXrWrs rrz&DistributionMetadata.get_contact_emails$$9(9(99r!c|jSr5)r3rs rrzDistributionMetadata.get_urls xxr!c|jSr5)r4rs rrz DistributionMetadata.get_licenses ||r!c|jSr5)r6rs rrz$DistributionMetadata.get_descriptionsr!c|jSr5)rYrs rrz)DistributionMetadata.get_long_descriptionrr!c"|jxsgSr5)r9rs rrz!DistributionMetadata.get_keywords}}""r!c&t|d|_y)Nr9)r r9rmrs r set_keywordsz!DistributionMetadata.set_keywordss$UJ7 r!c|jSr5)r7rs rrz"DistributionMetadata.get_platformss ~~r!c&t|d|_y)Nr7)r r7rs r set_platformsz"DistributionMetadata.set_platformss%e[9r!c"|jxsgSr5)r8rs rrz$DistributionMetadata.get_classifierss%2%r!c&t|d|_y)Nr8)r r8rs rset_classifiersz$DistributionMetadata.set_classifierss'}=r!c|jSr5)r[rs rget_download_urlz%DistributionMetadata.get_download_urlrr!c"|jxsgSr5)r;rs rrz!DistributionMetadata.get_requiresrr!cpddl}|D]}|jj|t||_yr?)distutils.versionpredicateversionpredicateVersionPredicaterr;rmrrr%s r set_requiresz!DistributionMetadata.set_requiress3) ;A  & & 7 7 : ;U  r!c"|jxsgSr5)r:rs rrz!DistributionMetadata.get_providesrr!c|Dcgc]}|j}}|D]!}ddl}|jj|#||_ycc}wr?)rrrsplit_provisionr:)rmrr%rs r set_providesz!DistributionMetadata.set_providessO$)*q** :A -  & & 6 6q 9 : +sA c"|jxsgSr5)r<rs rrz"DistributionMetadata.get_obsoletess~~##r!cpddl}|D]}|jj|t||_yr?)rrrrr<rs r set_obsoletesz"DistributionMetadata.set_obsoletess3) ;A  & & 7 7 : ;er!r5)%rrPrQrRrIryr]rtrqrrrrrrrrrrrr get_licencerrrrrrrrrrrrrrrrr!rrGrGs0".1"f*%BN7&'C!%.:K %#8:&>!#$#$%r!rGc@g}|D]}|j|dd|S)zConvert a 4-tuple 'help_options' list as found in various command classes to the 3-tuple form required by FancyGetopt. r)r)r@ new_options help_tuples rrrs2K, :a?+, r!)!rRrerrerrremailrrcrerrorsrrrr fancy_getoptr r utilr r r _logrdebugrcompilerr r#rGrrr!rrs  # 999 RZZ4 5  F F `x%x%v_'HsA==BB