3 e @sdZddlZddlZddlZddlmZy ddlZWnek rLdZYnXddlTddl m Z m Z ddl m Z mZmZddlmZddlmZejd Zd d ZGd d d ZGdddZddZdS)z}distutils.dist Provides the Distribution class, which represents the module distribution being built/installed/distributed. N)message_from_file)*) FancyGetopttranslate_longopt) check_environ strtobool rfc822_escape)log)DEBUGz^[a-zA-Z]([a-zA-Z0-9_]*)$cCsLt|tr nWarning: '{fieldname}' should be a list, got type '{typename}') isinstancestrlisttype__name__formatlocalsr WARN)value fieldnametypenamemsgr@/tmp/pip-build-vlmub77e/setuptools/setuptools/_distutils/dist.py _ensure_lists   rc@speZdZdZd~ddddgZdZdddddddddddddddddddddgZd>d?eDZddiZdd@dAZ dBdCZ ddEdFZ dGdHZ ddIdJZ dKdLZdMdNZdOdPZdQdRZddgfdSdTZdUdVZdWdXZdYdZZd[d\Zd]d^Zd_d`ZddadbZddcddZddfdgZejfdhdiZdjdkZdldmZ dndoZ!dpdqZ"drdsZ#dtduZ$dvdwZ%dxdyZ&dzd{Z'd|d}Z(dS) 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. verbosevrun verbosely (default)quietq!run quietly (turns verbosity off)dry-runndon't actually do anythinghelphshow 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-commandslist all available commandsnameprint package nameversionVprint package versionfullnameprint -authorprint the author's name author-email print the author's email address maintainerprint the maintainer's namemaintainer-email$print the maintainer's email addresscontact7print the maintainer's name if known, else the author's contact-email@print the maintainer's email address if known, else the author'surlprint the URL for this packagelicense print the license of the packagelicencealias for --license descriptionprint the package descriptionlong-description"print the long package description platformsprint the list of platforms classifiersprint the list of classifierskeywordsprint the list of keywordsprovides+print the list of packages/modules providedrequires+print the list of packages/modules required obsoletes0print the list of packages/modules made obsoletecCsg|]}t|dqS)r)r).0xrrr szDistribution.cCsld|_d|_d|_x|jD]}t||dqWt|_x,|jjD] }d|}t||t|j|q@Wi|_ d|_ d|_ d|_ i|_ g|_d|_i|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_i|_i|_|r|jd}|dk rH|d=xD|jD]8\}}|j |}x"|jD]\} } d| f|| <q(Wq Wd|kr|d|d <|d=d } t!dk r~t!j"| nt#j$j%| d x|jD]\} } t&|jd | rt|jd | | nNt&|j| rt|j| | n0t&|| rt|| | nd t'| } t!j"| qWd|_(|j dk r`x0|j D]&} | j)dsHP| dkr6d|_(Pq6W|j*dS)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 scriptrCrAz:'licence' distribution option is deprecated; use 'license' set_zUnknown distribution option: %sT-z --no-user-cfgF)+rdry_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_namerZcommand cmd_optionsopt_dictoptvalrkeyargrrr__init__s~                 zDistribution.__init__cCs&|jj|}|dkr"i}|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. N)rirz)rrdictrrrr|'s zDistribution.get_option_dictrYc Csddlm}|dkr"t|jj}|dk r@|j|||d}|sV|j|ddSxt|D]l}|jj|}|dkr|j|d|q\|j|d|||}x$|jdD]}|j|d|qWq\WdS)Nr)pformatz zno commands known yetzno option dict for '%s' commandzoption dict for '%s' command:r[)pprintrsortedrikeysannouncerzsplit) rheadercommandsindentrcmd_nameroutlinerrrdump_option_dicts2s&    zDistribution.dump_option_dictscCsg}ttjjtjdj}tjj|d}tjj|rB|j |tj dkrRd}nd}|j rtjjtjj d|}tjj|r|j |d}tjj|r|j |t r|jdd j||S) 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 three possible config files: distutils.cfg in the Distutils installation directory (ie. 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; and setup.cfg in the current directory. The file in the user's home directory can be disabled with the --no-user-cfg option. distutilsz distutils.cfgposixz.pydistutils.cfgzpydistutils.cfg~z setup.cfgzusing config files: %sz, )rospathdirnamermodules__file__joinisfileappendr,r expanduserr r)rfilessys_dirsys_file user_filename user_file local_filerrrfind_config_filesNs&       zDistribution.find_config_filescCsddlm}tjtjkr8ddddddd d d d d ddg }ng}t|}|dkrT|j}trb|jd|}x|D]}tr|jd||j |xf|j D]Z}|j |}|j |}x@|D]8} | dkr| |kr|j || } | jdd} || f|| <qWqW|jqnWd|jkrx|jdjD]\} \} } |jj | } yF| rRt|| t|  n(| dkrnt|| t| n t|| | Wn,tk r} zt| WYdd} ~ XnXqWdS)Nr) ConfigParserz install-basezinstall-platbasez install-libzinstall-platlibzinstall-purelibzinstall-headerszinstall-scriptsz install-dataprefixz exec-prefixhomeuserrootz"Distribution.parse_config_files():z reading %srr]_globalrr^)rr^) configparserrrr base_prefix frozensetrr rreadsectionsrZr|rzreplacerrir{ negative_optr`r ValueErrorDistutilsOptionError)r filenamesrignore_optionsparserfilenamesectionrZrrrsrcaliasrrrrparse_config_files~sJ               zDistribution.parse_config_filescCs|j}g|_t||j}|j|j|jddi|j|j|d}|j }t j |j |j |rhdSx |r|j||}|dkrjdSqjW|jr|j|t|jdk|jddS|jstddS) 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). rCrA)argsobjectNr)display_optionsrzno commands suppliedT)_get_toplevel_optionsrrrset_negative_aliasesr set_aliasesgetoptrhget_option_orderr set_verbosityrhandle_display_options_parse_command_optsr% _show_helplenDistutilsArgError)rtoplevel_optionsrr option_orderrrrparse_command_lines,       zDistribution.parse_command_linecCs |jdgS)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. command-packages=N0list of packages that provide distutils commands)rNr)global_options)rrrrrsz"Distribution._get_toplevel_optionscCsddlm}|d}tj|s*td||jj|y|j|}Wn*tk rn}zt |WYdd}~XnXt ||st d|t |dot |jtsd}t |||j}t |dr|j}|j|jt |d rt |jtrt|j}ng}|j|j|j||j||j|d d\}} t | d rV| jrV|j|d|gd dSt |d rt |jtrd} xP|jD]F\} } } }t | |j| r|d } t|r|nt d || fq|W| rdS|j|}x&t| jD]\}}d|f||<qW|S)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. r)Commandzinvalid 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%)rrzYinvalid help function %r for help option '%s': must be a callable object (function, etc.)z command line) distutils.cmdr command_rematch SystemExitrrget_command_classDistutilsModuleErrorr issubclassDistutilsClassErrorrr rr rcopyupdaterfix_help_optionsset_option_tablerrrr%r get_attr_namecallabler|varsr{)rrrrr cmd_classrrroptshelp_option_found help_optionshortdescfuncrr,rrrrrsb                   z Distribution._parse_command_optscCsTxNdD]F}t|j|}|dkr qt|trdd|jdD}t|j||qWdS)zSet final values for all the options on the Distribution instance, analogous to the .finalize_options() method of Command objects. rMrINcSsg|] }|jqSr)strip)rUelmrrrrWksz1Distribution.finalize_options..,)rMrI)rdrbr r rr`)rrrrrrras   zDistribution.finalize_optionsc Cs ddlm}ddlm}|rR|r*|j}n|j}|j||j|jdt d|rt|j|j |jd t dx|j D]z}t |t rt||r|} n |j|} t| drt | jtr|j| jt| jn |j| j|jd | jt dq|Wt ||jd S) 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_usage)rz Global options:rYz*Information display options (just display z!information, ignore any commands)rzOptions for '%s' command:NzKInformation display options (just display information, ignore any commands))distutils.corerrrrrr print_help common_usageprintrrr rrrrrr rrrrg) rrrrrrrrZrklassrrrrns6           zDistribution._show_helpc Csddlm}|jr4|jtdt||jdSd}i}x|jD]}d||d<qDWxt|D]l\}}|r^|j|r^t|}t |j d|}|dkrtdj |n |dkrtd j |nt|d}q^W|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. r)rrYrrXrMrIrrKrOrQrSr[)rMrI)rKrOrQrS) rr help_commandsprint_commandsrrgrrzrrdrbr) rrrany_display_optionsis_display_optionoptionrrrrrrrs,  z#Distribution.handle_display_optionscCsnt|dx\|D]T}|jj|}|s0|j|}y |j}Wntk rRd}YnXtd|||fqWdS)zZPrint a subset of the list of all commands -- used by 'print_commands()'. :z(no description available)z %-*s %sN)rrerzrrEAttributeError)rrr max_lengthcmdrrErrrprint_command_lists      zDistribution.print_command_listcCsddl}|jj}i}x|D] }d||<qWg}x&|jjD]}|j|s:|j|q:Wd}x$||D]}t||krdt|}qdW|j|d||rt |j|d|dS)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.commandr__all__rerrzrrr r)rr std_commandsis_stdr extra_commandsr rrrrs*     zDistribution.print_commandsc Csddl}|jj}i}x|D] }d||<qWg}x&|jjD]}|j|s:|j|q:Wg}x\||D]P}|jj|}|s|j|}y |j}Wnt k rd}YnX|j||fqdW|S)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'. rNrz(no description available)) r rrrerrzrrrEr ) rrrrr rrvrrErrrget_command_lists(        zDistribution.get_command_listcCsN|j}t|tsJ|dkrd}dd|jdD}d|krD|jdd||_|S)z9Return a list of packages from which commands are loaded.NrYcSsg|]}|dkr|jqS)rY)r)rUpkgrrrrW"sz5Distribution.get_command_packages..rzdistutils.commandr)rfr r rinsert)rpkgsrrrget_command_packagess  z!Distribution.get_command_packagescCs|jj|}|r|Sx|jD]}d||f}|}yt|tj|}Wntk r^wYnXyt||}Wn&tk rt d|||fYnX||j|<|SWt d|dS)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%s.%sz3invalid command '%s' (no class '%s' in module '%s')zinvalid command '%s'N) rerzr __import__rr ImportErrorrdr r)rrrpkgname module_name klass_namemodulerrrr(s(   zDistribution.get_command_classcCsn|jj|}| rj|rjtr(|jd||j|}||}|j|<d|j|<|jj|}|rj|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. z.z1error in %s: command '%s' has no such option '%s')get_command_namer|r rr{boolean_optionsr rr r r`rrrr) rrx option_dict command_namersourcer bool_optsneg_opt is_stringrrrrris>           z!Distribution._set_command_optionsrcCsddlm}t||s&|}|j|}n|j}|js8|S|jd|_d|j|<|j||r|x|j D]}|j ||qhW|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. r)r) rrr r!r# finalizedinitialize_optionsryrget_sub_commandsreinitialize_command)rrreinit_subcommandsrr&subrrrr.s     z!Distribution.reinitialize_commandcCstj||dS)N)r )rrlevelrrrrszDistribution.announcecCsx|jD]}|j|qWdS)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)rr rrr run_commandss zDistribution.run_commandscCsD|jj|rdStjd||j|}|j|jd|j|<dS)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)ryrzr infor!ensure_finalizedrun)rrr rrrr2s   zDistribution.run_commandcCst|jp|jpgdkS)Nr)rrkrn)rrrrhas_pure_modulesszDistribution.has_pure_modulescCs|jot|jdkS)Nr)rqr)rrrrhas_ext_modulesszDistribution.has_ext_modulescCs|jot|jdkS)Nr)ror)rrrrhas_c_librariesszDistribution.has_c_librariescCs|jp|jS)N)r7r8)rrrr has_modulesszDistribution.has_modulescCs|jot|jdkS)Nr)rpr)rrrr has_headersszDistribution.has_headerscCs|jot|jdkS)Nr)rur)rrrr has_scriptsszDistribution.has_scriptscCs|jot|jdkS)Nr)rvr)rrrrhas_data_filesszDistribution.has_data_filescCs|jo|j o|j S)N)r7r8r9)rrrris_pures zDistribution.is_pure)rrrr)rr r!)r"r#r$)r%r&r')r(Nr))r*Nr+)r,Nr-)r.r/r0)r1Nr2)r3Nr4)r5Nr6)r7Nr8)r9Nr:)r;Nr<)r=Nr>)r?Nr@)rANrB)rCNrD)rENrF)rGNrH)rINrJ)rKNrL)rMNrN)rONrP)rQNrR)rSNrT)N)NNrY)N)r)N)r))r __module__ __qualname____doc__rrrr_rrr|rrrrrrrrrr rrrrr!rr.r INFOrr3r2r7r8r9r:r;r<r=r>rrrrr-s     0 :C [  1(!" &  , ) rc@seZdZdZdUZdVddZddZddZddZdd Z d!d"Z d#d$Z d%d&Z d'd(Z d)d*Zd+d,Zd-d.Zd/d0Zd1d2Zd3d4Zd5d6ZeZd7d8Zd9d:Zd;d<Zd=d>Zd?d@ZdAdBZdCdDZdEdFZdGdHZdIdJZdKdLZ dMdNZ!dOdPZ"dQdRZ#dSdTZ$dS)Wraz]Dummy class to hold the distribution meta-data: name, version, author, and so forth. r,r.r3 author_emailr7maintainer_emailr?rArElong_descriptionrMrIr1r; contact_emailrK download_urlrOrQrSNcCs|dk r|jt|nfd|_d|_d|_d|_d|_d|_d|_d|_ d|_ d|_ d|_ d|_ d|_d|_d|_d|_d|_dS)N) read_pkg_fileopenr,r.r3rCr7rDr?rArErErMrIrKrGrOrQrS)rrrrrrs&zDistributionMetadata.__init__cst|fdd}fdd}d}|d|_|d|_|d|_|d |_d |_|d |_d |_|d |_|d |_ dkr|d|_ nd |_ |d|_ |d|_dkr|dj d|_ |d|_|d|_|dkr|d|_|d|_|d|_nd |_d |_d |_d S)z-Reads the metadata values from a file object.cs|}|dkrdS|S)NUNKNOWNr)r,r)rrr _read_field)sz7DistributionMetadata.read_pkg_file.._read_fieldcsj|d}|gkrdS|S)N)get_all)r,values)rrr _read_list/s z6DistributionMetadata.read_pkg_file.._read_listzmetadata-versionr,r.summaryr3Nz author-emailz home-pagerAz download-urlrErMrplatform classifierz1.1rQrOrS)rr,r.rEr3r7rCrDr?rArGrErrMrIrKrQrOrS)rfilerKrNmetadata_versionr)rrrH%s:                 z"DistributionMetadata.read_pkg_filec Cs2ttjj|dddd}|j|WdQRXdS)z7Write the PKG-INFO file into the release tree. zPKG-INFOwzUTF-8)encodingN)rIrrrwrite_pkg_file)rbase_dirpkg_inforrrwrite_pkg_infoYs z#DistributionMetadata.write_pkg_infocCsbd}|js"|js"|js"|js"|jr&d}|jd||jd|j|jd|j|jd|j|jd|j |jd|j |jd |j |jd |j |jr|jd |jt |j}|jd |d j|j}|r|jd||j|d|j|j|d|j|j|d|j|j|d|j|j|d|jdS)z9Write the PKG-INFO format data to a file object. z1.0z1.1zMetadata-Version: %s z Name: %s z Version: %s z Summary: %s zHome-page: %s z Author: %s zAuthor-email: %s z License: %s zDownload-URL: %s zDescription: %s rz Keywords: %s Platform ClassifierRequiresProvides ObsoletesN)rOrQrSrKrGrget_name get_versionget_descriptionget_url get_contactget_contact_email get_licenserget_long_descriptionr get_keywords _write_list get_platformsget_classifiers get_requires get_provides get_obsoletes)rrRr. long_descrMrrrrV`s0  z#DistributionMetadata.write_pkg_filecCs$x|D]}|jd||fqWdS)Nz%s: %s )r)rrRr,rMrrrrrhs z DistributionMetadata._write_listcCs |jpdS)NrJ)r,)rrrrr_szDistributionMetadata.get_namecCs |jpdS)Nz0.0.0)r.)rrrrr`sz DistributionMetadata.get_versioncCsd|j|jfS)Nz%s-%s)r_r`)rrrr get_fullnamesz!DistributionMetadata.get_fullnamecCs |jpdS)NrJ)r3)rrrr get_authorszDistributionMetadata.get_authorcCs |jpdS)NrJ)rC)rrrrget_author_emailsz%DistributionMetadata.get_author_emailcCs |jpdS)NrJ)r7)rrrrget_maintainersz#DistributionMetadata.get_maintainercCs |jpdS)NrJ)rD)rrrrget_maintainer_emailsz)DistributionMetadata.get_maintainer_emailcCs|jp|jpdS)NrJ)r7r3)rrrrrcsz DistributionMetadata.get_contactcCs|jp|jpdS)NrJ)rDrC)rrrrrdsz&DistributionMetadata.get_contact_emailcCs |jpdS)NrJ)r?)rrrrrbszDistributionMetadata.get_urlcCs |jpdS)NrJ)rA)rrrrresz DistributionMetadata.get_licensecCs |jpdS)NrJ)rE)rrrrrasz$DistributionMetadata.get_descriptioncCs |jpdS)NrJ)rE)rrrrrfsz)DistributionMetadata.get_long_descriptioncCs |jpgS)N)rM)rrrrrgsz!DistributionMetadata.get_keywordscCst|d|_dS)NrM)rrM)rrrrr set_keywordssz!DistributionMetadata.set_keywordscCs |jp dgS)NrJ)rI)rrrrrisz"DistributionMetadata.get_platformscCst|d|_dS)NrI)rrI)rrrrr set_platformssz"DistributionMetadata.set_platformscCs |jpgS)N)rK)rrrrrjsz$DistributionMetadata.get_classifierscCst|d|_dS)NrK)rrK)rrrrrset_classifierssz$DistributionMetadata.set_classifierscCs |jpdS)NrJ)rG)rrrrget_download_urlsz%DistributionMetadata.get_download_urlcCs |jpgS)N)rQ)rrrrrksz!DistributionMetadata.get_requirescCs0ddl}x|D]}|jj|qWt||_dS)Nr)distutils.versionpredicateversionpredicateVersionPredicater rQ)rrrrrrr set_requiress z!DistributionMetadata.set_requirescCs |jpgS)N)rO)rrrrrlsz!DistributionMetadata.get_providescCs:dd|D}x |D]}ddl}|jj|qW||_dS)NcSsg|] }|jqSr)r)rUrrrrrWsz5DistributionMetadata.set_provides..r)rxrysplit_provisionrO)rrrrrrr set_providess  z!DistributionMetadata.set_providescCs |jpgS)N)rS)rrrrrmsz"DistributionMetadata.get_obsoletescCs0ddl}x|D]}|jj|qWt||_dS)Nr)rxryrzr rS)rrrrrrr set_obsoletess z"DistributionMetadata.set_obsoletes)r,r.r3rCr7rDr?rArErErMrIr1r;rFrKrGrOrQrS)N)%rr?r@rArcrrHrYrVrhr_r`rorprqrrrsrcrdrbre get_licencerarfrgrtrirurjrvrwrkr{rlr}rmr~rrrrrasN 4"racCs(g}x|D]}|j|ddq W|S)zConvert a 4-tuple 'help_options' list as found in various command classes to the 3-tuple form required by FancyGetopt. r)r)rZ new_options help_tuplerrrrs r)rArrreemailrr}rZdistutils.errorsdistutils.fancy_getoptrrdistutils.utilrrrrr distutils.debugr compilerrrrarrrrrs4      Zc